Bump ICU data

This commit is contained in:
Laurenz 2023-10-28 20:35:38 +02:00
parent 221609b11c
commit 0f4f37cc09
3 changed files with 17 additions and 25 deletions

View File

@ -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"

View File

@ -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))
}