diff --git a/crates/typst/src/math/style.rs b/crates/typst/src/math/style.rs index b368d485f..876033d57 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 59fa29318..a672b6750 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 index 8415a28b9..5201181ee 100644 Binary files a/tests/ref/math/style.png and b/tests/ref/math/style.png differ diff --git a/tests/typ/math/style.typ b/tests/typ/math/style.typ index 37b0e6d81..30cb4aa05 100644 --- a/tests/typ/math/style.typ +++ b/tests/typ/math/style.typ @@ -22,6 +22,10 @@ $a/b, display(a/b), display(a)/display(b), inline(a/b), script(a/b), sscript(a/b // Test a few style exceptions. $h, bb(N), cal(R), Theta, italic(Theta), sans(Theta), sans(italic(Theta))$ +--- +// Test hebrew exceptions. +$aleph, beth, gimel, daleth$ + --- // Test font fallback. $ よ and 🏳️‍🌈 $