diff options
| author | Igor Khanin <igor@khanin.biz> | 2025-05-28 16:05:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-28 13:05:10 +0000 |
| commit | 6e0f48e192ddbd934d3aadd056810c86bcc3defd (patch) | |
| tree | 74ef59293c12e9b1114d365d877847c67d2cb9f4 /crates/typst-library/src/text | |
| parent | 2a258a0c3849073c56a0559dbd67ee2effcd1031 (diff) | |
More precise math font autocomplete suggestions (#6316)
Diffstat (limited to 'crates/typst-library/src/text')
| -rw-r--r-- | crates/typst-library/src/text/font/book.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/typst-library/src/text/font/book.rs b/crates/typst-library/src/text/font/book.rs index 9f8acce8..cd90a08f 100644 --- a/crates/typst-library/src/text/font/book.rs +++ b/crates/typst-library/src/text/font/book.rs @@ -194,6 +194,8 @@ bitflags::bitflags! { const MONOSPACE = 1 << 0; /// Glyphs have short strokes at their stems. const SERIF = 1 << 1; + /// Font face has a MATH table + const MATH = 1 << 2; } } @@ -272,6 +274,7 @@ impl FontInfo { let mut flags = FontFlags::empty(); flags.set(FontFlags::MONOSPACE, ttf.is_monospaced()); + flags.set(FontFlags::MATH, ttf.tables().math.is_some()); // Determine whether this is a serif or sans-serif font. if let Some(panose) = ttf |
