From 055263ee9f2253de9f176970df9d47d3b2bd2467 Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Fri, 29 Nov 2024 10:25:27 +0100 Subject: [PATCH] =?UTF-8?q?Make=20`math.italic`=20compatible=20with=20?= =?UTF-8?q?=C4=A7=20(#5492)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/typst-layout/src/math/text.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/typst-layout/src/math/text.rs b/crates/typst-layout/src/math/text.rs index 3b923c5b0..05d22d12d 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,