From 8c27c51c27c760a54350bf18ddfae34aaa19d89e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 19 Jun 2022 10:47:38 -0600 Subject: [PATCH] [arabic-pua] Rename symbols --- src/hb-ft.cc | 4 ++-- src/hb-ot-cmap-table.hh | 8 ++++---- src/hb-ot-shaper-arabic-pua.hh | 36 +++++++++++++++++----------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 04df8c2e9..84a426e81 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -326,10 +326,10 @@ hb_ft_get_nominal_glyph (hb_font_t *font, break; #ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK case OT::OS2::font_page_t::FONT_PAGE_SIMP_ARABIC: - g = FT_Get_Char_Index (ft_font->ft_face, _hb_remap_arabic_pua1 (unicode)); + g = FT_Get_Char_Index (ft_font->ft_face, _hb_arabic_pua_simp_map (unicode)); break; case OT::OS2::font_page_t::FONT_PAGE_TRAD_ARABIC: - g = FT_Get_Char_Index (ft_font->ft_face, _hb_remap_arabic_pua2 (unicode)); + g = FT_Get_Char_Index (ft_font->ft_face, _hb_arabic_pua_trad_map (unicode)); break; #endif default: diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 5fcc12886..69b430fb7 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1505,7 +1505,7 @@ struct SubtableUnicodesCache { }; static inline hb_codepoint_t -_hb_remap_symbol_pua (hb_codepoint_t codepoint) +_hb_symbol_pua_map (hb_codepoint_t codepoint) { if (codepoint <= 0x00FFu) { @@ -1745,14 +1745,14 @@ struct cmap { switch ((unsigned) face->table.OS2->get_font_page ()) { case OS2::font_page_t::FONT_PAGE_NONE: - this->get_glyph_funcZ = get_glyph_from_symbol; + this->get_glyph_funcZ = get_glyph_from_symbol; break; #ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK case OS2::font_page_t::FONT_PAGE_SIMP_ARABIC: - this->get_glyph_funcZ = get_glyph_from_symbol; + this->get_glyph_funcZ = get_glyph_from_symbol; break; case OS2::font_page_t::FONT_PAGE_TRAD_ARABIC: - this->get_glyph_funcZ = get_glyph_from_symbol; + this->get_glyph_funcZ = get_glyph_from_symbol; break; #endif default: diff --git a/src/hb-ot-shaper-arabic-pua.hh b/src/hb-ot-shaper-arabic-pua.hh index 98cd266e9..d35377606 100644 --- a/src/hb-ot-shaper-arabic-pua.hh +++ b/src/hb-ot-shaper-arabic-pua.hh @@ -2,7 +2,7 @@ #ifndef HB_OT_SHAPER_ARABIC_PUA_HH #define HB_OT_SHAPER_ARABIC_PUA_HH -static const uint16_t _arabic_table_pua1[][128] = { +static const uint16_t _arabic_table_pua_simp[][128] = { { /* 0x0000u..0x007Fu */ 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, @@ -96,17 +96,17 @@ static const uint16_t _arabic_table_pua1[][128] = { }; static inline hb_codepoint_t -_hb_remap_arabic_pua1(hb_codepoint_t codepoint) +_hb_arabic_pua_simp_map (hb_codepoint_t codepoint) { - if (hb_in_range (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua1[0][codepoint]; - if (hb_in_range (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua1[1][codepoint - 0x0080u]; - if (hb_in_range (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua1[2][codepoint - 0x0600u]; - if (hb_in_range (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua1[3][codepoint - 0x2000u]; - if (hb_in_range (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua1[4][codepoint - 0xFE80u]; + if (hb_in_range (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua_simp[0][codepoint]; + if (hb_in_range (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua_simp[1][codepoint - 0x0080u]; + if (hb_in_range (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua_simp[2][codepoint - 0x0600u]; + if (hb_in_range (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua_simp[3][codepoint - 0x2000u]; + if (hb_in_range (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua_simp[4][codepoint - 0xFE80u]; return 0; } -static const uint16_t _arabic_table_pua2[][128] = { +static const uint16_t _arabic_table_pua_trad[][128] = { { /* 0x0000u..0x007Fu */ 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, @@ -272,17 +272,17 @@ static const uint16_t _arabic_table_pua2[][128] = { }; static inline hb_codepoint_t -_hb_remap_arabic_pua2(hb_codepoint_t codepoint) +_hb_arabic_pua_trad_map (hb_codepoint_t codepoint) { - if (hb_in_range (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua2[0][codepoint]; - if (hb_in_range (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua2[1][codepoint - 0x0080u]; - if (hb_in_range (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua2[2][codepoint - 0x0600u]; - if (hb_in_range (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua2[3][codepoint - 0x2000u]; - if (hb_in_range (codepoint, 0xFBD0u, 0xFC4Fu)) return _arabic_table_pua2[4][codepoint - 0xFBD0u]; - if (hb_in_range (codepoint, 0xFC50u, 0xFCCFu)) return _arabic_table_pua2[5][codepoint - 0xFC50u]; - if (hb_in_range (codepoint, 0xFCD0u, 0xFD4Fu)) return _arabic_table_pua2[6][codepoint - 0xFCD0u]; - if (hb_in_range (codepoint, 0xFD50u, 0xFDCFu)) return _arabic_table_pua2[7][codepoint - 0xFD50u]; - if (hb_in_range (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua2[8][codepoint - 0xFE80u]; + if (hb_in_range (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua_trad[0][codepoint]; + if (hb_in_range (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua_trad[1][codepoint - 0x0080u]; + if (hb_in_range (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua_trad[2][codepoint - 0x0600u]; + if (hb_in_range (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua_trad[3][codepoint - 0x2000u]; + if (hb_in_range (codepoint, 0xFBD0u, 0xFC4Fu)) return _arabic_table_pua_trad[4][codepoint - 0xFBD0u]; + if (hb_in_range (codepoint, 0xFC50u, 0xFCCFu)) return _arabic_table_pua_trad[5][codepoint - 0xFC50u]; + if (hb_in_range (codepoint, 0xFCD0u, 0xFD4Fu)) return _arabic_table_pua_trad[6][codepoint - 0xFCD0u]; + if (hb_in_range (codepoint, 0xFD50u, 0xFDCFu)) return _arabic_table_pua_trad[7][codepoint - 0xFD50u]; + if (hb_in_range (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua_trad[8][codepoint - 0xFE80u]; return 0; }