diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-10-28 20:35:38 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-10-28 20:35:38 +0200 |
| commit | 0f4f37cc093592ba19a131a9262e1c655d56a04a (patch) | |
| tree | 600ae776ddc145f4ee1691ca8df6bec252d0d469 | |
| parent | 221609b11c5c184a59249632a1f00fc908758c3c (diff) | |
Bump ICU data
| -rw-r--r-- | crates/typst-library/Cargo.toml | 10 | ||||
| -rw-r--r-- | crates/typst-library/assets/icudata.postcard | bin | 352005 -> 352005 bytes | |||
| -rw-r--r-- | crates/typst-library/src/layout/par.rs | 32 |
3 files changed, 17 insertions, 25 deletions
diff --git a/crates/typst-library/Cargo.toml b/crates/typst-library/Cargo.toml index e0af6a56..34214eb5 100644 --- a/crates/typst-library/Cargo.toml +++ b/crates/typst-library/Cargo.toml @@ -25,11 +25,11 @@ csv = "1" ecow = { version = "0.2", features = ["serde"] } hayagriva = "0.3.2" hypher = "0.1.4" -icu_properties = { version = "1.2.0", features = ["serde"] } -icu_provider = { version = "1.2.0", features = ["sync"] } -icu_provider_adapters = "1.2.0" -icu_provider_blob = "1.2.0" -icu_segmenter = { version = "1.2.1", features = ["serde"] } +icu_properties = { version = "1.3", features = ["serde"] } +icu_provider = { version = "1.3", features = ["sync"] } +icu_provider_adapters = "1.3" +icu_provider_blob = "1.3" +icu_segmenter = { version = "1.3", features = ["serde"] } kurbo = "0.9" lipsum = "0.9" log = "0.4" diff --git a/crates/typst-library/assets/icudata.postcard b/crates/typst-library/assets/icudata.postcard Binary files differindex e910bf8e..a1fdbd48 100644 --- a/crates/typst-library/assets/icudata.postcard +++ b/crates/typst-library/assets/icudata.postcard diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index 9255124e..1cd749c8 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -1092,21 +1092,27 @@ fn linebreak_optimized<'a>(vt: &Vt, p: &'a Preparation<'a>, width: Abs) -> Vec<L /// Generated by the following command: /// /// ```sh -/// icu4x-datagen --locales full --keys-for-bin target/debug/typst \ -/// --format blob --out library/assets/icudata.postcard --overwrite +/// icu4x-datagen --locales full \ +/// --format blob \ +/// --keys-for-bin target/debug/typst \ +/// --out crates/typst-library/assets/icudata.postcard \ +/// --overwrite /// ``` /// -/// Install icu4x-datagen with `cargo install icu4x-datagen`. +/// Install icu_datagen with `cargo install icu_datagen`. static ICU_DATA: &[u8] = include_bytes!("../../assets/icudata.postcard"); /// Generated by the following command: /// /// ```sh -/// icu4x-datagen --locales zh ja --keys segmenter/line@1 --format blob \ -/// --out library/assets/cj_linebreak_data.postcard --overwrite +/// icu4x-datagen --locales zh ja \ +/// --format blob \ +/// --keys segmenter/line@1 \ +/// --out crates/typst-library/assets/cj_linebreak_data.postcard \ +/// --overwrite /// ``` /// -/// The used icu4x-datagen should be patched by +/// The used icu_datagen should be patched by /// https://github.com/peng1999/icu4x/commit/b9beb6cbf633d61fc3d7983e5baf7f4449fbfae5 static CJ_LINEBREAK_DATA: &[u8] = include_bytes!("../../assets/cj_linebreak_data.postcard"); @@ -1245,20 +1251,6 @@ impl Iterator for Breakpoints<'_> { } } - // Fix for https://github.com/unicode-org/icu4x/issues/3811 - if !self.mandatory { - while let Some(&next) = self.linebreaks.peek() { - if !self.p.bidi.text[self.end..next] - .contains(|c: char| !c.is_whitespace()) - { - self.end = next; - self.linebreaks.next(); - } else { - break; - } - } - } - self.offset = self.end; Some((self.end, self.mandatory, false)) } |
