< prev index next >
src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-thai.cc
Print this page
@@ -50,11 +50,11 @@
return AC;
if (u == 0x0E0Du || u == 0x0E10u)
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;
}
@@ -68,16 +68,16 @@
};
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;
}
@@ -95,11 +95,11 @@
{
struct thai_pua_mapping_t {
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 */
{0x0E4Au, 0xF70Cu, 0xF891u}, /* MAI TRI */
{0x0E4Bu, 0xF70Du, 0xF894u}, /* MAI CHATTAWA */
@@ -242,10 +242,11 @@
below_state = below_edge.next_state;
/* 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
info[i].codepoint = thai_pua_shape (info[i].codepoint, action, font);
}
@@ -308,11 +309,11 @@
/* We only get one script at a time, so a script-agnostic implementation
* is adequate here. */
#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;
for (buffer->idx = 0; buffer->idx < count && !buffer->in_error;)
{
@@ -363,20 +364,20 @@
do_thai_pua_shaping (plan, buffer, font);
}
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 */
};
< prev index next >