summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalo <57839069+MDLC01@users.noreply.github.com>2024-11-29 10:25:27 +0100
committerGitHub <noreply@github.com>2024-11-29 09:25:27 +0000
commit055263ee9f2253de9f176970df9d47d3b2bd2467 (patch)
tree34a317cdef5bed47dfc0afe6c3a666a6077f8d42
parent3ab131c22ca6e7ef9e28d6352a96bb0846fc608b (diff)
Make `math.italic` compatible with ħ (#5492)
-rw-r--r--crates/typst-layout/src/math/text.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/typst-layout/src/math/text.rs b/crates/typst-layout/src/math/text.rs
index 3b923c5b..05d22d12 100644
--- a/crates/typst-layout/src/math/text.rs
+++ b/crates/typst-layout/src/math/text.rs
@@ -150,8 +150,8 @@ fn styled_char(styles: StyleChain, c: char, auto_italic: bool) -> char {
auto_italic
&& matches!(
c,
- 'a'..='z' | 'ı' | 'ȷ' | 'A'..='Z' | 'α'..='ω' |
- '∂' | 'ϵ' | 'ϑ' | 'ϰ' | 'ϕ' | 'ϱ' | 'ϖ'
+ 'a'..='z' | 'ħ' | 'ı' | 'ȷ' | 'A'..='Z' |
+ 'α'..='ω' | '∂' | 'ϵ' | 'ϑ' | 'ϰ' | 'ϕ' | 'ϱ' | 'ϖ'
)
&& matches!(variant, Sans | Serif),
);
@@ -306,6 +306,7 @@ fn latin_exception(
('e', Cal, false, _) => 'ℯ',
('g', Cal, false, _) => 'ℊ',
('o', Cal, false, _) => 'ℴ',
+ ('ħ', Serif, .., true) => 'ℏ',
('ı', Serif, .., true) => '𝚤',
('ȷ', Serif, .., true) => '𝚥',
_ => return None,