From 92a83fc4a6c25436831a9816795dc624f1195ebc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 24 Oct 2022 14:11:52 -0600 Subject: [PATCH] Revert "Switch unicode-linebreak to xi-unicode for ~25% faster builds" This fixes ZJW emoji support. This reverts commit c1262eca74ca01321f64bb0d2afb216e62240616. --- Cargo.toml | 2 +- src/font/matches.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 65a400f..c77a43a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ rustybuzz = "0.5" swash = "0.1" sys-locale = "0.2" unicode-bidi = "0.3" -xi-unicode = "0.3.0" +unicode-linebreak = "0.1" unicode-script = "0.5" [workspace] diff --git a/src/font/matches.rs b/src/font/matches.rs index 039a1c6..f6aab09 100644 --- a/src/font/matches.rs +++ b/src/font/matches.rs @@ -245,7 +245,7 @@ impl<'a> FontMatches<'a> { let mut words = Vec::new(); let mut start_word = 0; - for (end_lb, _) in xi_unicode::LineBreakIterator::new(span) { + for (end_lb, _) in unicode_linebreak::linebreaks(span) { let mut start_lb = end_lb; for (i, c) in span[start_word..end_lb].char_indices() { if start_word + i == end_lb {