Don't do fallback positioning for Indic and Thai shapers
This commit is contained in:
parent
981748cb2e
commit
865745b5b8
|
@ -354,4 +354,5 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic =
|
||||||
NULL, /* compose */
|
NULL, /* compose */
|
||||||
setup_masks_arabic,
|
setup_masks_arabic,
|
||||||
true, /* zero_width_attached_marks */
|
true, /* zero_width_attached_marks */
|
||||||
|
true, /* fallback_position */
|
||||||
};
|
};
|
||||||
|
|
|
@ -1360,4 +1360,5 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic =
|
||||||
compose_indic,
|
compose_indic,
|
||||||
setup_masks_indic,
|
setup_masks_indic,
|
||||||
false, /* zero_width_attached_marks */
|
false, /* zero_width_attached_marks */
|
||||||
|
false, /* fallback_position */
|
||||||
};
|
};
|
||||||
|
|
|
@ -221,6 +221,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
|
||||||
compose_default,
|
compose_default,
|
||||||
NULL, /* setup_masks */
|
NULL, /* setup_masks */
|
||||||
true, /* zero_width_attached_marks */
|
true, /* zero_width_attached_marks */
|
||||||
|
true, /* fallback_position */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -334,4 +335,5 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai =
|
||||||
NULL, /* compose */
|
NULL, /* compose */
|
||||||
NULL, /* setup_masks */
|
NULL, /* setup_masks */
|
||||||
true, /* zero_width_attached_marks */
|
true, /* zero_width_attached_marks */
|
||||||
|
false,/* fallback_position */
|
||||||
};
|
};
|
||||||
|
|
|
@ -131,6 +131,7 @@ struct hb_ot_complex_shaper_t
|
||||||
hb_font_t *font);
|
hb_font_t *font);
|
||||||
|
|
||||||
bool zero_width_attached_marks;
|
bool zero_width_attached_marks;
|
||||||
|
bool fallback_position;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HB_COMPLEX_SHAPER_IMPLEMENT(name) extern HB_INTERNAL const hb_ot_complex_shaper_t _hb_ot_complex_shaper_##name;
|
#define HB_COMPLEX_SHAPER_IMPLEMENT(name) extern HB_INTERNAL const hb_ot_complex_shaper_t _hb_ot_complex_shaper_##name;
|
||||||
|
|
|
@ -451,12 +451,6 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
hb_ot_position_complex_fallback (hb_ot_shape_context_t *c)
|
|
||||||
{
|
|
||||||
_hb_ot_shape_fallback_position (c->plan, c->font, c->buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
hb_ot_truetype_kern (hb_ot_shape_context_t *c)
|
hb_ot_truetype_kern (hb_ot_shape_context_t *c)
|
||||||
{
|
{
|
||||||
|
@ -482,12 +476,6 @@ hb_ot_truetype_kern (hb_ot_shape_context_t *c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
|
||||||
hb_position_complex_fallback_visual (hb_ot_shape_context_t *c)
|
|
||||||
{
|
|
||||||
hb_ot_truetype_kern (c);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
hb_ot_position (hb_ot_shape_context_t *c)
|
hb_ot_position (hb_ot_shape_context_t *c)
|
||||||
{
|
{
|
||||||
|
@ -495,14 +483,16 @@ hb_ot_position (hb_ot_shape_context_t *c)
|
||||||
|
|
||||||
hb_bool_t fallback = !hb_ot_position_complex (c);
|
hb_bool_t fallback = !hb_ot_position_complex (c);
|
||||||
|
|
||||||
if (fallback)
|
if (fallback && c->plan->shaper->fallback_position)
|
||||||
hb_ot_position_complex_fallback (c);
|
_hb_ot_shape_fallback_position (c->plan, c->font, c->buffer);
|
||||||
|
|
||||||
if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction))
|
if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction))
|
||||||
hb_buffer_reverse (c->buffer);
|
hb_buffer_reverse (c->buffer);
|
||||||
|
|
||||||
|
/* Visual fallback goes here. */
|
||||||
|
|
||||||
if (fallback)
|
if (fallback)
|
||||||
hb_position_complex_fallback_visual (c);
|
hb_ot_truetype_kern (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue