diff options
Diffstat (limited to 'crates/typst-library/src/text/shift.rs')
| -rw-r--r-- | crates/typst-library/src/text/shift.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/typst-library/src/text/shift.rs b/crates/typst-library/src/text/shift.rs index 003ecf47..9723bbf0 100644 --- a/crates/typst-library/src/text/shift.rs +++ b/crates/typst-library/src/text/shift.rs @@ -157,7 +157,11 @@ fn is_shapable(engine: &Engine, text: &str, styles: StyleChain) -> bool { .select(family.as_str(), variant(styles)) .and_then(|id| world.font(id)) { - return text.chars().all(|c| font.ttf().glyph_index(c).is_some()); + let covers = family.covers(); + return text.chars().all(|c| { + covers.map_or(true, |cov| cov.is_match(c.encode_utf8(&mut [0; 4]))) + && font.ttf().glyph_index(c).is_some() + }); } } |
