Skip to content
Draft
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
586f39f
side-by-side analysis with Swash (bidi levels, boundaries, scripts) +…
conor-93 Sep 15, 2025
f03116d
- resolve Mandatory boundaries
conor-93 Sep 16, 2025
4054508
- boundary analysis clean-up / condense logic / todos for optimisations
conor-93 Sep 16, 2025
0ec33d4
- avoid consuming and re-creating iterator over word boundary data
conor-93 Sep 16, 2025
4ab3adc
- remove `previous_substring_end`, made redundant by `building_range_…
conor-93 Sep 16, 2025
ca6b03a
avoid consuming iterator when getting first/last char lens
conor-93 Sep 17, 2025
8de6f53
avoid unnecessarily consuming iterators for script/line break data
conor-93 Sep 17, 2025
b2a0fc2
.
conor-93 Sep 17, 2025
9895c38
.
conor-93 Sep 17, 2025
326fd09
- dont reallocate string for fast path
conor-93 Sep 17, 2025
2d9a397
.
conor-93 Sep 17, 2025
8ce1898
avoid allocating vecs for boundaries/bidi levels
conor-93 Sep 17, 2025
663f79f
.
conor-93 Sep 17, 2025
0971ca3
.
conor-93 Sep 17, 2025
d3303ae
establish an iterator for `contiguous_word_break_substrings` instead …
conor-93 Sep 17, 2025
fb20378
just store index, not char too
conor-93 Sep 17, 2025
26a8591
.
conor-93 Sep 17, 2025
2581a69
.
conor-93 Sep 17, 2025
ac31353
.
conor-93 Sep 17, 2025
f3a53a4
address TODOs
conor-93 Sep 18, 2025
4406abd
add Swash-equivalent Cluster types to Parley, WIP select_font reimple…
conor-93 Sep 25, 2025
00609fb
icu-backed select_font equivalent impl
conor-93 Sep 25, 2025
36ed996
select_font working, minus force_normalize
conor-93 Oct 1, 2025
0621f5d
force_normalize pseudocode/groundwork
conor-93 Oct 1, 2025
fb24f87
- frontload/simplify analysis info access
conor-93 Oct 2, 2025
1ea1c3a
fix crash on empty style ranges
conor-93 Oct 5, 2025
09bac72
use icu for everything except script
conor-93 Oct 6, 2025
c77d830
use icu for script/locale/language
conor-93 Oct 13, 2025
77c2a36
- simplify and fix bidi level retrieval + add tests
conor-93 Oct 13, 2025
1269dcc
optimise is_emoji_grapheme
conor-93 Oct 13, 2025
4865e52
- remove 'UserData' concept, name as style_index within Parley, make …
conor-93 Oct 13, 2025
269d15d
.
conor-93 Oct 13, 2025
b6ef959
frontload analysis of remaining flags, clean-up
conor-93 Oct 13, 2025
ee98e60
.
conor-93 Oct 13, 2025
9305809
.
conor-93 Oct 14, 2025
678bc14
.
conor-93 Oct 14, 2025
5120ba7
avoid unnecessary cluster vec allocation in shape_item
conor-93 Oct 14, 2025
9343970
.
conor-93 Oct 14, 2025
cac1bfd
CharInfo comments
conor-93 Oct 14, 2025
364e37b
.
conor-93 Oct 14, 2025
7f62eec
move analysis + tests into analysis module
conor-93 Oct 14, 2025
c28f356
.
conor-93 Oct 14, 2025
c4d79ef
.
conor-93 Oct 14, 2025
99866c5
populate analysis mod
conor-93 Oct 14, 2025
8d41e9e
migrate from swash Whitespace
conor-93 Oct 15, 2025
a01e3a2
migrate from swash Boundary
conor-93 Oct 15, 2025
3f984d0
migrate from swash WordBreakStrength
conor-93 Oct 15, 2025
1168372
linting
conor-93 Oct 15, 2025
cf307f4
swash_convert -> icu_convert w/ fixes
conor-93 Oct 17, 2025
119a30b
test conversion (intermediate)
conor-93 Oct 17, 2025
43f69c0
.
conor-93 Oct 17, 2025
046d7e5
remove redundant/excessive assertions
conor-93 Oct 17, 2025
5197277
- baked data source build configuration
conor-93 Oct 20, 2025
7dc55ab
remove bidi.rs and remaining swash info stores
conor-93 Oct 20, 2025
31515ec
.
conor-93 Oct 20, 2025
0718714
.
conor-93 Oct 20, 2025
395b52f
Merge remote-tracking branch 'origin/main' into icu4x
conor-93 Oct 20, 2025
62578aa
- remove print statements
conor-93 Oct 20, 2025
d59c170
- use modular icu dependencies
conor-93 Oct 21, 2025
04bf451
move deps to workspace
conor-93 Oct 21, 2025
858b9c4
move Setting into Parley, remove swash dep entirely from the main crate
conor-93 Oct 21, 2025
e9e107c
.
conor-93 Oct 21, 2025
e7612cd
.
conor-93 Oct 21, 2025
ba430a3
stop compiling all locale data, just use en for now
conor-93 Oct 21, 2025
166a2a8
use short name in place of hard-coded fontique script tag
conor-93 Oct 24, 2025
f505e7c
generic loop -> while let
conor-93 Oct 24, 2025
3c52a47
.
conor-93 Oct 24, 2025
26a710b
.
conor-93 Oct 26, 2025
4637d82
icu_locale_core::LanguageIdentifier
conor-93 Oct 27, 2025
d2ee5ed
.
conor-93 Oct 27, 2025
50ecbc8
.
conor-93 Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,393 changes: 1,306 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions parley/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ core_maths = { version = "0.1.1", optional = true }
accesskit = { workspace = true, optional = true }
hashbrown = { workspace = true }
harfrust = { workspace = true }
icu = { version = "2.0.0"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the icu crate with default features enabled doesn't seem right to me. That's going to pull in a lot of stuff which we surely aren't using?

icu_properties = { version = "2.0.0", features = ["unicode_bidi"]}
icu_provider = "2.0.0"
unicode-bidi = "0.3.18"
# Used in ICU4X baked data sources
zerovec = "0.11.4"

[build-dependencies]
icu = { version = "2.0.0"}
icu_provider_export = "2.0.0"
icu_provider_source = "2.0.0"

[dev-dependencies]
parley_dev = { workspace = true }
Expand Down
55 changes: 55 additions & 0 deletions parley/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//! Defines baked ICU4X Unicode data providers.
//!
//! This narrows data compiled from all Unicode data sets, to only that which we use.

use icu_provider_export::baked_exporter::*;
use icu_provider_export::prelude::*;
use std::path::PathBuf;

fn main() {
println!("cargo:rerun-if-changed=build.rs");

let mod_directory = PathBuf::from(std::env::var_os("OUT_DIR").unwrap())
.join("baked_data");

let source = icu_provider_source::SourceDataProvider::new();

ExportDriver::new(
[DataLocaleFamily::FULL],
DeduplicationStrategy::Maximal.into(),
LocaleFallbacker::new_without_data(),
)
.with_markers([
// Properties - Map data
icu::properties::provider::PropertyEnumScriptV1::INFO,
icu::properties::provider::PropertyEnumGeneralCategoryV1::INFO,
icu::properties::provider::PropertyEnumBidiClassV1::INFO,
icu::properties::provider::PropertyEnumLineBreakV1::INFO,
icu::properties::provider::PropertyEnumGraphemeClusterBreakV1::INFO,

// Properties - Set data
icu::properties::provider::PropertyBinaryVariationSelectorV1::INFO,
icu::properties::provider::PropertyBinaryBasicEmojiV1::INFO,
icu::properties::provider::PropertyBinaryEmojiV1::INFO,
icu::properties::provider::PropertyBinaryExtendedPictographicV1::INFO,
icu::properties::provider::PropertyBinaryRegionalIndicatorV1::INFO,

// Segmenters
icu::segmenter::provider::SegmenterBreakGraphemeClusterV1::INFO,
icu::segmenter::provider::SegmenterBreakWordOverrideV1::INFO,
icu::segmenter::provider::SegmenterDictionaryAutoV1::INFO,
icu::segmenter::provider::SegmenterLstmAutoV1::INFO,
icu::segmenter::provider::SegmenterBreakWordV1::INFO,
icu::segmenter::provider::SegmenterBreakLineV1::INFO,
])
.export(
&source,
BakedExporter::new(mod_directory.clone(), {
let mut options = Options::default();
options.overwrite = true;
options
})
.unwrap(),
)
.expect("Datagen should be successful");
}
Loading
Loading