diff options
| author | Wenzhuo Liu <mgt@oi-wiki.org> | 2023-11-13 19:13:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-13 12:13:05 +0100 |
| commit | e07275163f6039a0f93e14574b136bd1041bb2ad (patch) | |
| tree | dbba879a08c807704a0806bd90869578e804320a /crates | |
| parent | 97bb0fbce3b21dcac4334b9d01d27cd83498e460 (diff) | |
Filter out meta items when adding CJK-Latin (#2655)
spacing.
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/layout/par.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-library/src/layout/par.rs b/crates/typst-library/src/layout/par.rs index b3d5fb3e..98cf605f 100644 --- a/crates/typst-library/src/layout/par.rs +++ b/crates/typst-library/src/layout/par.rs @@ -751,7 +751,7 @@ fn prepare<'a>( /// See Requirements for Chinese Text Layout, Section 3.2.2 Mixed Text Composition in Horizontal /// Written Mode fn add_cjk_latin_spacing(items: &mut [Item]) { - let mut items = items.iter_mut().peekable(); + let mut items = items.iter_mut().filter(|x| !matches!(x, Item::Meta(_))).peekable(); let mut prev: Option<&ShapedGlyph> = None; while let Some(item) = items.next() { let Some(text) = item.text_mut() else { |
