[Indic] Improve check on ligatures
Only skip actual ligatures, not marks in-between ligature components.
This commit is contained in:
parent
771a8f5028
commit
c3e6fdc379
|
@ -51,6 +51,11 @@ get_lig_comp (const hb_glyph_info_t &info)
|
||||||
{
|
{
|
||||||
return info.lig_props() & 0x0F;
|
return info.lig_props() & 0x0F;
|
||||||
}
|
}
|
||||||
|
static inline bool
|
||||||
|
is_a_ligature (const hb_glyph_info_t &info)
|
||||||
|
{
|
||||||
|
return unlikely (get_lig_id (info) && ~get_lig_comp (info));
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
|
static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
|
||||||
uint8_t lig_id = buffer->next_serial () & 0x0F;
|
uint8_t lig_id = buffer->next_serial () & 0x0F;
|
||||||
|
|
|
@ -201,7 +201,7 @@ static inline bool
|
||||||
is_one_of (const hb_glyph_info_t &info, unsigned int flags)
|
is_one_of (const hb_glyph_info_t &info, unsigned int flags)
|
||||||
{
|
{
|
||||||
/* If it ligated, all bets are off. */
|
/* If it ligated, all bets are off. */
|
||||||
if (unlikely (get_lig_id (info))) return false;
|
if (is_a_ligature (info)) return false;
|
||||||
return !!(FLAG (info.indic_category()) & flags);
|
return !!(FLAG (info.indic_category()) & flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue