[Indic] Improve check on ligatures

Only skip actual ligatures, not marks in-between ligature components.
This commit is contained in:
Behdad Esfahbod 2012-07-23 20:11:42 -04:00
parent 771a8f5028
commit c3e6fdc379
2 changed files with 6 additions and 1 deletions

View File

@ -51,6 +51,11 @@ get_lig_comp (const hb_glyph_info_t &info)
{
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) {
uint8_t lig_id = buffer->next_serial () & 0x0F;

View File

@ -201,7 +201,7 @@ static inline bool
is_one_of (const hb_glyph_info_t &info, unsigned int flags)
{
/* 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);
}