Skip to content

Commit 9eeba17

Browse files
dfrgkhaledhosny
authored andcommitted
Map math script in old_tag_from_script
Fixes #162
1 parent 5b628b5 commit 9eeba17

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/hb/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ pub mod script {
469469
pub const TODHRI: Script = Script::from_bytes(b"Todr");
470470
pub const TULU_TIGALARI: Script = Script::from_bytes(b"Tutg");
471471

472-
pub const SCRIPT_MATH: Script = Script::from_bytes(b"Zmth");
472+
pub const MATH: Script = Script::from_bytes(b"Zmth");
473473

474474
// https://github.com/harfbuzz/harfbuzz/issues/1162
475475
pub const MYANMAR_ZAWGYI: Script = Script::from_bytes(b"Qaag");

src/hb/tag.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ fn new_tag_from_script(script: Script) -> Option<hb_tag_t> {
237237
fn old_tag_from_script(script: Script) -> hb_tag_t {
238238
// This seems to be accurate as of end of 2012.
239239
match script {
240+
script::MATH => hb_tag_t::from_bytes(b"math"),
241+
240242
// Katakana and Hiragana both map to 'kana'.
241243
script::HIRAGANA => hb_tag_t::from_bytes(b"kana"),
242244

0 commit comments

Comments
 (0)