diff options
| -rw-r--r-- | crates/typst/src/math/style.rs | 5 | ||||
| -rw-r--r-- | crates/typst/src/symbols/sym.rs | 2 | ||||
| -rw-r--r-- | tests/ref/math/style.png | bin | 23862 -> 25050 bytes | |||
| -rw-r--r-- | tests/typ/math/style.typ | 4 |
4 files changed, 11 insertions, 0 deletions
diff --git a/crates/typst/src/math/style.rs b/crates/typst/src/math/style.rs index b368d485..876033d5 100644 --- a/crates/typst/src/math/style.rs +++ b/crates/typst/src/math/style.rs @@ -319,6 +319,8 @@ pub fn styled_char(styles: StyleChain, c: char) -> char { 'Α'..='Ω' => 'Α', 'α'..='ω' => 'α', '0'..='9' => '0', + // Hebrew Alef -> Dalet. + '\u{05D0}'..='\u{05D3}' => '\u{05D0}', _ => return c, }; @@ -382,6 +384,9 @@ pub fn styled_char(styles: StyleChain, c: char) -> char { (Cal | Frak | Mono | Bb, _, _) => return c, }, + // Hebrew Alef -> Dalet. + '\u{05D0}'..='\u{05D3}' => 0x2135, + // Numbers. '0'..='9' => match tuple { (Serif, false, _) => 0x0030, diff --git a/crates/typst/src/symbols/sym.rs b/crates/typst/src/symbols/sym.rs index 59fa2931..a672b675 100644 --- a/crates/typst/src/symbols/sym.rs +++ b/crates/typst/src/symbols/sym.rs @@ -842,6 +842,8 @@ pub(crate) const SYM: &[(&str, Symbol)] = symbols! { bet: 'ב', gimmel: 'ג', gimel: 'ג', + daleth: 'ד', + dalet: 'ד', shin: 'ש', // Double-struck. diff --git a/tests/ref/math/style.png b/tests/ref/math/style.png Binary files differindex 8415a28b..5201181e 100644 --- a/tests/ref/math/style.png +++ b/tests/ref/math/style.png diff --git a/tests/typ/math/style.typ b/tests/typ/math/style.typ index 37b0e6d8..30cb4aa0 100644 --- a/tests/typ/math/style.typ +++ b/tests/typ/math/style.typ @@ -23,6 +23,10 @@ $a/b, display(a/b), display(a)/display(b), inline(a/b), script(a/b), sscript(a/b $h, bb(N), cal(R), Theta, italic(Theta), sans(Theta), sans(italic(Theta))$ --- +// Test hebrew exceptions. +$aleph, beth, gimel, daleth$ + +--- // Test font fallback. $ よ and 🏳️🌈 $ |
