< prev index next >

src/java.desktop/share/native/libfontmanager/harfbuzz/hb-unicode-private.hh

Print this page

        

*** 106,116 **** modified_combining_class (hb_codepoint_t unicode) { /* XXX This hack belongs to the Myanmar shaper. */ if (unlikely (unicode == 0x1037u)) unicode = 0x103Au; ! /* XXX This hack belongs to the SEA shaper (for Tai Tham): * Reorder SAKOT to ensure it comes after any tone marks. */ if (unlikely (unicode == 0x1A60u)) return 254; /* XXX This hack belongs to the Tibetan shaper: * Reorder PADMA to ensure it comes after any vowel marks. */ --- 106,116 ---- modified_combining_class (hb_codepoint_t unicode) { /* XXX This hack belongs to the Myanmar shaper. */ if (unlikely (unicode == 0x1037u)) unicode = 0x103Au; ! /* XXX This hack belongs to the USE shaper (for Tai Tham): * Reorder SAKOT to ensure it comes after any tone marks. */ if (unlikely (unicode == 0x1A60u)) return 254; /* XXX This hack belongs to the Tibetan shaper: * Reorder PADMA to ensure it comes after any vowel marks. */
*** 124,144 **** static inline hb_bool_t is_variation_selector (hb_codepoint_t unicode) { /* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the * Arabic shaper. No need to match them here. */ ! return unlikely (hb_in_ranges (unicode, 0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */ 0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */ } /* Default_Ignorable codepoints: * * Note: While U+115F, U+1160, U+3164 and U+FFA0 are Default_Ignorable, * we do NOT want to hide them, as the way Uniscribe has implemented them * is with regular spacing glyphs, and that's the way fonts are made to work. * As such, we make exceptions for those four. * * Unicode 7.0: * $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.txt | sed 's/;.*#/#/' * 00AD # Cf SOFT HYPHEN * 034F # Mn COMBINING GRAPHEME JOINER --- 124,145 ---- static inline hb_bool_t is_variation_selector (hb_codepoint_t unicode) { /* U+180B..180D MONGOLIAN FREE VARIATION SELECTORs are handled in the * Arabic shaper. No need to match them here. */ ! return unlikely (hb_in_ranges<hb_codepoint_t> (unicode, 0xFE00u, 0xFE0Fu, /* VARIATION SELECTOR-1..16 */ 0xE0100u, 0xE01EFu)); /* VARIATION SELECTOR-17..256 */ } /* Default_Ignorable codepoints: * * Note: While U+115F, U+1160, U+3164 and U+FFA0 are Default_Ignorable, * we do NOT want to hide them, as the way Uniscribe has implemented them * is with regular spacing glyphs, and that's the way fonts are made to work. * As such, we make exceptions for those four. + * Also ignoring U+1BCA0..1BCA3. https://github.com/behdad/harfbuzz/issues/503 * * Unicode 7.0: * $ grep '; Default_Ignorable_Code_Point ' DerivedCoreProperties.txt | sed 's/;.*#/#/' * 00AD # Cf SOFT HYPHEN * 034F # Mn COMBINING GRAPHEME JOINER
*** 177,203 **** hb_codepoint_t page = ch >> 8; switch (page) { case 0x00: return unlikely (ch == 0x00ADu); case 0x03: return unlikely (ch == 0x034Fu); case 0x06: return unlikely (ch == 0x061Cu); ! case 0x17: return hb_in_range (ch, 0x17B4u, 0x17B5u); ! case 0x18: return hb_in_range (ch, 0x180Bu, 0x180Eu); ! case 0x20: return hb_in_ranges (ch, 0x200Bu, 0x200Fu, 0x202Au, 0x202Eu, 0x2060u, 0x206Fu); ! case 0xFE: return hb_in_range (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; ! case 0xFF: return hb_in_range (ch, 0xFFF0u, 0xFFF8u); default: return false; } } else { /* Other planes */ switch (plane) { ! case 0x01: return hb_in_ranges (ch, 0x1BCA0u, 0x1BCA3u, ! 0x1D173u, 0x1D17Au); ! case 0x0E: return hb_in_range (ch, 0xE0000u, 0xE0FFFu); default: return false; } } } --- 178,203 ---- hb_codepoint_t page = ch >> 8; switch (page) { case 0x00: return unlikely (ch == 0x00ADu); case 0x03: return unlikely (ch == 0x034Fu); case 0x06: return unlikely (ch == 0x061Cu); ! case 0x17: return hb_in_range<hb_codepoint_t> (ch, 0x17B4u, 0x17B5u); ! case 0x18: return hb_in_range<hb_codepoint_t> (ch, 0x180Bu, 0x180Eu); ! case 0x20: return hb_in_ranges<hb_codepoint_t> (ch, 0x200Bu, 0x200Fu, 0x202Au, 0x202Eu, 0x2060u, 0x206Fu); ! case 0xFE: return hb_in_range<hb_codepoint_t> (ch, 0xFE00u, 0xFE0Fu) || ch == 0xFEFFu; ! case 0xFF: return hb_in_range<hb_codepoint_t> (ch, 0xFFF0u, 0xFFF8u); default: return false; } } else { /* Other planes */ switch (plane) { ! case 0x01: return hb_in_range<hb_codepoint_t> (ch, 0x1D173u, 0x1D17Au); ! case 0x0E: return hb_in_range<hb_codepoint_t> (ch, 0xE0000u, 0xE0FFFu); default: return false; } } }
*** 344,370 **** /* Lao */ #define HB_MODIFIED_COMBINING_CLASS_CCC118 118 /* sign u / sign uu */ #define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */ /* Tibetan ! * Modify U+0F74 (ccc=132) to reorder before ccc=130 marks. */ #define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */ ! #define HB_MODIFIED_COMBINING_CLASS_CCC130 130 /* sign i */ ! #define HB_MODIFIED_COMBINING_CLASS_CCC132 128 /* sign u */ ! /* Misc */ #define HB_UNICODE_GENERAL_CATEGORY_IS_MARK(gen_cat) \ ! (FLAG_SAFE (gen_cat) & \ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))) #define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL(gen_cat) \ ! (FLAG_SAFE (gen_cat) & \ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL))) #endif /* HB_UNICODE_PRIVATE_HH */ --- 344,371 ---- /* Lao */ #define HB_MODIFIED_COMBINING_CLASS_CCC118 118 /* sign u / sign uu */ #define HB_MODIFIED_COMBINING_CLASS_CCC122 122 /* mai * */ /* Tibetan ! * ! * In case of multiple vowel-signs, use u first (but after achung) ! * this allows Dzongkha multi-vowel shortcuts to render correctly */ #define HB_MODIFIED_COMBINING_CLASS_CCC129 129 /* sign aa */ ! #define HB_MODIFIED_COMBINING_CLASS_CCC130 132 /* sign i */ ! #define HB_MODIFIED_COMBINING_CLASS_CCC132 131 /* sign u */ /* Misc */ #define HB_UNICODE_GENERAL_CATEGORY_IS_MARK(gen_cat) \ ! (FLAG_UNSAFE (gen_cat) & \ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))) #define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK_OR_MODIFIER_SYMBOL(gen_cat) \ ! (FLAG_UNSAFE (gen_cat) & \ (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \ FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL))) #endif /* HB_UNICODE_PRIVATE_HH */
< prev index next >