mirror of
https://github.com/typst/typst
synced 2025-05-18 19:15:29 +08:00
Fix hebrew symbol codepoints (#3375)
This commit is contained in:
parent
713154c14b
commit
a1f111dfa6
@ -319,6 +319,8 @@ pub fn styled_char(styles: StyleChain, c: char) -> char {
|
|||||||
'Α'..='Ω' => 'Α',
|
'Α'..='Ω' => 'Α',
|
||||||
'α'..='ω' => 'α',
|
'α'..='ω' => 'α',
|
||||||
'0'..='9' => '0',
|
'0'..='9' => '0',
|
||||||
|
// Hebrew Alef -> Dalet.
|
||||||
|
'\u{05D0}'..='\u{05D3}' => '\u{05D0}',
|
||||||
_ => return c,
|
_ => return c,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -382,6 +384,9 @@ pub fn styled_char(styles: StyleChain, c: char) -> char {
|
|||||||
(Cal | Frak | Mono | Bb, _, _) => return c,
|
(Cal | Frak | Mono | Bb, _, _) => return c,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Hebrew Alef -> Dalet.
|
||||||
|
'\u{05D0}'..='\u{05D3}' => 0x2135,
|
||||||
|
|
||||||
// Numbers.
|
// Numbers.
|
||||||
'0'..='9' => match tuple {
|
'0'..='9' => match tuple {
|
||||||
(Serif, false, _) => 0x0030,
|
(Serif, false, _) => 0x0030,
|
||||||
|
@ -842,6 +842,8 @@ pub(crate) const SYM: &[(&str, Symbol)] = symbols! {
|
|||||||
bet: 'ב',
|
bet: 'ב',
|
||||||
gimmel: 'ג',
|
gimmel: 'ג',
|
||||||
gimel: 'ג',
|
gimel: 'ג',
|
||||||
|
daleth: 'ד',
|
||||||
|
dalet: 'ד',
|
||||||
shin: 'ש',
|
shin: 'ש',
|
||||||
|
|
||||||
// Double-struck.
|
// Double-struck.
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
@ -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.
|
// Test a few style exceptions.
|
||||||
$h, bb(N), cal(R), Theta, italic(Theta), sans(Theta), sans(italic(Theta))$
|
$h, bb(N), cal(R), Theta, italic(Theta), sans(Theta), sans(italic(Theta))$
|
||||||
|
|
||||||
|
---
|
||||||
|
// Test hebrew exceptions.
|
||||||
|
$aleph, beth, gimel, daleth$
|
||||||
|
|
||||||
---
|
---
|
||||||
// Test font fallback.
|
// Test font fallback.
|
||||||
$ よ and 🏳️🌈 $
|
$ よ and 🏳️🌈 $
|
||||||
|
Loading…
x
Reference in New Issue
Block a user