diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc index e6f80f59e7..6ba925c675 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-thai.cc @@ -52,7 +52,7 @@ get_consonant_type (hb_codepoint_t u) return RC; if (u == 0x0E0Eu || u == 0x0E0Fu) return DC; - if (hb_in_range (u, 0x0E01u, 0x0E2Eu)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E01u, 0x0E2Eu)) return NC; return NOT_CONSONANT; } @@ -70,12 +70,12 @@ enum thai_mark_type_t static thai_mark_type_t get_mark_type (hb_codepoint_t u) { - if (u == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) || - u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu)) + if (u == 0x0E31u || hb_in_range<hb_codepoint_t> (u, 0x0E34u, 0x0E37u) || + u == 0x0E47u || hb_in_range<hb_codepoint_t> (u, 0x0E4Du, 0x0E4Eu)) return AV; - if (hb_in_range (u, 0x0E38u, 0x0E3Au)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E38u, 0x0E3Au)) return BV; - if (hb_in_range (u, 0x0E48u, 0x0E4Cu)) + if (hb_in_range<hb_codepoint_t> (u, 0x0E48u, 0x0E4Cu)) return T; return NOT_MARK; } @@ -97,7 +97,7 @@ thai_pua_shape (hb_codepoint_t u, thai_action_t action, hb_font_t *font) hb_codepoint_t u; hb_codepoint_t win_pua; hb_codepoint_t mac_pua; - } const *pua_mappings = NULL; + } const *pua_mappings = nullptr; static const thai_pua_mapping_t SD_mappings[] = { {0x0E48u, 0xF70Au, 0xF88Bu}, /* MAI EK */ {0x0E49u, 0xF70Bu, 0xF88Eu}, /* MAI THO */ @@ -244,6 +244,7 @@ do_thai_pua_shaping (const hb_ot_shape_plan_t *plan HB_UNUSED, /* At least one of the above/below actions is NOP. */ thai_action_t action = above_edge.action != NOP ? above_edge.action : below_edge.action; + buffer->unsafe_to_break (base, i); if (action == RD) info[base].codepoint = thai_pua_shape (info[base].codepoint, action, font); else @@ -310,7 +311,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, #define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u) #define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du) #define SARA_AA_FROM_SARA_AM(x) ((x) - 1) -#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) +#define IS_TONE_MARK(x) (hb_in_ranges<hb_codepoint_t> ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) buffer->clear_output (); unsigned int count = buffer->len; @@ -365,18 +366,18 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai = { - "thai", - NULL, /* collect_features */ - NULL, /* override_features */ - NULL, /* data_create */ - NULL, /* data_destroy */ + nullptr, /* collect_features */ + nullptr, /* override_features */ + nullptr, /* data_create */ + nullptr, /* data_destroy */ preprocess_text_thai, - NULL, /* postprocess_glyphs */ + nullptr, /* postprocess_glyphs */ HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT, - NULL, /* decompose */ - NULL, /* compose */ - NULL, /* setup_masks */ - NULL, /* disable_otl */ + nullptr, /* decompose */ + nullptr, /* compose */ + nullptr, /* setup_masks */ + nullptr, /* disable_otl */ + nullptr, /* reorder_marks */ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE, false,/* fallback_position */ }; |