Preserve glyph props

This commit is contained in:
Behdad Esfahbod 2022-01-12 15:06:40 -07:00
parent 0b2c514fb4
commit 96c969c820
1 changed files with 9 additions and 2 deletions

View File

@ -717,8 +717,7 @@ struct hb_ot_apply_context_t :
bool ligature = false, bool ligature = false,
bool component = false) const bool component = false) const
{ {
unsigned int add_in = _hb_glyph_info_get_glyph_props (&buffer->cur()) & unsigned int add_in = _hb_glyph_info_get_glyph_props (&buffer->cur());
HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE;
add_in |= HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED; add_in |= HB_OT_LAYOUT_GLYPH_PROPS_SUBSTITUTED;
if (ligature) if (ligature)
{ {
@ -734,9 +733,17 @@ struct hb_ot_apply_context_t :
if (component) if (component)
add_in |= HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED; add_in |= HB_OT_LAYOUT_GLYPH_PROPS_MULTIPLIED;
if (likely (has_glyph_classes)) if (likely (has_glyph_classes))
{
add_in &= HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE;
_hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | gdef.get_glyph_props (glyph_index)); _hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | gdef.get_glyph_props (glyph_index));
}
else if (class_guess) else if (class_guess)
{
add_in &= HB_OT_LAYOUT_GLYPH_PROPS_PRESERVE;
_hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | class_guess); _hb_glyph_info_set_glyph_props (&buffer->cur(), add_in | class_guess);
}
else
_hb_glyph_info_set_glyph_props (&buffer->cur(), add_in);
} }
void replace_glyph (hb_codepoint_t glyph_index) const void replace_glyph (hb_codepoint_t glyph_index) const