|
|
|
@ -94,17 +94,44 @@ _hb_ot_layout_skip_mark (hb_face_t *face, |
|
|
|
|
static inline void |
|
|
|
|
set_lig_props (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp) |
|
|
|
|
{ |
|
|
|
|
info.lig_props() = (lig_id << 4) | (lig_comp & 0x0F); |
|
|
|
|
info.lig_props() = (lig_id << 5) | (lig_comp & 0x0F); |
|
|
|
|
} |
|
|
|
|
static inline void |
|
|
|
|
set_lig_props_for_ligature (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_num_comps) |
|
|
|
|
{ |
|
|
|
|
info.lig_props() = (lig_id << 5) | 0x10 | (lig_num_comps & 0x0F); |
|
|
|
|
} |
|
|
|
|
static inline void |
|
|
|
|
set_lig_props_for_mark (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp) |
|
|
|
|
{ |
|
|
|
|
info.lig_props() = (lig_id << 5) | (lig_comp & 0x0F); |
|
|
|
|
} |
|
|
|
|
static inline void |
|
|
|
|
set_lig_props_for_component (hb_glyph_info_t &info, unsigned int comp) |
|
|
|
|
{ |
|
|
|
|
set_lig_props_for_mark (info, 0, comp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static inline unsigned int |
|
|
|
|
get_lig_id (const hb_glyph_info_t &info) |
|
|
|
|
{ |
|
|
|
|
return info.lig_props() >> 4; |
|
|
|
|
return info.lig_props() >> 5; |
|
|
|
|
} |
|
|
|
|
static inline unsigned int |
|
|
|
|
get_lig_comp (const hb_glyph_info_t &info) |
|
|
|
|
{ |
|
|
|
|
return info.lig_props() & 0x0F; |
|
|
|
|
if (info.lig_props() & 0x10) |
|
|
|
|
return 0; |
|
|
|
|
else |
|
|
|
|
return info.lig_props() & 0x0F; |
|
|
|
|
} |
|
|
|
|
static inline unsigned int |
|
|
|
|
get_lig_num_comps (const hb_glyph_info_t &info) |
|
|
|
|
{ |
|
|
|
|
if (info.lig_props() & 0x10) |
|
|
|
|
return info.lig_props() & 0x0F; |
|
|
|
|
else |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
static inline bool |
|
|
|
|
is_a_ligature (const hb_glyph_info_t &info) |
|
|
|
@ -113,7 +140,7 @@ is_a_ligature (const hb_glyph_info_t &info) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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 () & 0x07; |
|
|
|
|
if (unlikely (!lig_id)) |
|
|
|
|
lig_id = allocate_lig_id (buffer); /* in case of overflow */ |
|
|
|
|
return lig_id; |
|
|
|
|