[arabic-pua] Rename symbols
This commit is contained in:
parent
7698962911
commit
8c27c51c27
|
@ -326,10 +326,10 @@ hb_ft_get_nominal_glyph (hb_font_t *font,
|
||||||
break;
|
break;
|
||||||
#ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK
|
#ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK
|
||||||
case OT::OS2::font_page_t::FONT_PAGE_SIMP_ARABIC:
|
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;
|
break;
|
||||||
case OT::OS2::font_page_t::FONT_PAGE_TRAD_ARABIC:
|
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;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1505,7 +1505,7 @@ struct SubtableUnicodesCache {
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline hb_codepoint_t
|
static inline hb_codepoint_t
|
||||||
_hb_remap_symbol_pua (hb_codepoint_t codepoint)
|
_hb_symbol_pua_map (hb_codepoint_t codepoint)
|
||||||
{
|
{
|
||||||
if (codepoint <= 0x00FFu)
|
if (codepoint <= 0x00FFu)
|
||||||
{
|
{
|
||||||
|
@ -1745,14 +1745,14 @@ struct cmap
|
||||||
{
|
{
|
||||||
switch ((unsigned) face->table.OS2->get_font_page ()) {
|
switch ((unsigned) face->table.OS2->get_font_page ()) {
|
||||||
case OS2::font_page_t::FONT_PAGE_NONE:
|
case OS2::font_page_t::FONT_PAGE_NONE:
|
||||||
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_remap_symbol_pua>;
|
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_symbol_pua_map>;
|
||||||
break;
|
break;
|
||||||
#ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK
|
#ifndef HB_NO_OT_SHAPER_ARABIC_FALLBACK
|
||||||
case OS2::font_page_t::FONT_PAGE_SIMP_ARABIC:
|
case OS2::font_page_t::FONT_PAGE_SIMP_ARABIC:
|
||||||
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_remap_arabic_pua1>;
|
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_arabic_pua_simp_map>;
|
||||||
break;
|
break;
|
||||||
case OS2::font_page_t::FONT_PAGE_TRAD_ARABIC:
|
case OS2::font_page_t::FONT_PAGE_TRAD_ARABIC:
|
||||||
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_remap_arabic_pua2>;
|
this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable, _hb_arabic_pua_trad_map>;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#ifndef HB_OT_SHAPER_ARABIC_PUA_HH
|
#ifndef HB_OT_SHAPER_ARABIC_PUA_HH
|
||||||
#define 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..0x007Fu */
|
||||||
0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,
|
0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,
|
||||||
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
|
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<hb_codepoint_t> (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua1[0][codepoint];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua_simp[0][codepoint];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua1[1][codepoint - 0x0080u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua_simp[1][codepoint - 0x0080u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua1[2][codepoint - 0x0600u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua_simp[2][codepoint - 0x0600u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua1[3][codepoint - 0x2000u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua_simp[3][codepoint - 0x2000u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua1[4][codepoint - 0xFE80u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua_simp[4][codepoint - 0xFE80u];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uint16_t _arabic_table_pua2[][128] = {
|
static const uint16_t _arabic_table_pua_trad[][128] = {
|
||||||
{ /* 0x0000u..0x007Fu */
|
{ /* 0x0000u..0x007Fu */
|
||||||
0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,
|
0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,
|
||||||
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
|
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<hb_codepoint_t> (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua2[0][codepoint];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0000u, 0x007Fu)) return _arabic_table_pua_trad[0][codepoint];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua2[1][codepoint - 0x0080u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0080u, 0x00FFu)) return _arabic_table_pua_trad[1][codepoint - 0x0080u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua2[2][codepoint - 0x0600u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x0600u, 0x067Fu)) return _arabic_table_pua_trad[2][codepoint - 0x0600u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua2[3][codepoint - 0x2000u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0x2000u, 0x207Fu)) return _arabic_table_pua_trad[3][codepoint - 0x2000u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFBD0u, 0xFC4Fu)) return _arabic_table_pua2[4][codepoint - 0xFBD0u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFBD0u, 0xFC4Fu)) return _arabic_table_pua_trad[4][codepoint - 0xFBD0u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFC50u, 0xFCCFu)) return _arabic_table_pua2[5][codepoint - 0xFC50u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFC50u, 0xFCCFu)) return _arabic_table_pua_trad[5][codepoint - 0xFC50u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFCD0u, 0xFD4Fu)) return _arabic_table_pua2[6][codepoint - 0xFCD0u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFCD0u, 0xFD4Fu)) return _arabic_table_pua_trad[6][codepoint - 0xFCD0u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFD50u, 0xFDCFu)) return _arabic_table_pua2[7][codepoint - 0xFD50u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFD50u, 0xFDCFu)) return _arabic_table_pua_trad[7][codepoint - 0xFD50u];
|
||||||
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua2[8][codepoint - 0xFE80u];
|
if (hb_in_range<hb_codepoint_t> (codepoint, 0xFE80u, 0xFEFFu)) return _arabic_table_pua_trad[8][codepoint - 0xFE80u];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue