Behdad Esfahbod 10 years ago
parent cdcdfe61b9
commit b931e0b0ce
  1. 4
      src/hb-ot-font.cc
  2. 22
      src/hb-ot-layout-gsubgpos-private.hh

@ -45,9 +45,9 @@ struct hb_ot_face_metrics_accelerator_t
inline void init (hb_face_t *face,
hb_tag_t _hea_tag, hb_tag_t _mtx_tag,
unsigned int default_advance)
unsigned int default_advance_)
{
this->default_advance = default_advance;
this->default_advance = default_advance_;
this->num_metrics = face->get_num_glyphs ();
hb_blob_t *_hea_blob = OT::Sanitizer<OT::_hea>::sanitize (face->reference_table (_hea_tag));

@ -516,39 +516,39 @@ struct hb_apply_context_t
inline bool
match_properties_mark (hb_codepoint_t glyph,
unsigned int glyph_props,
unsigned int lookup_props) const
unsigned int match_props) const
{
/* If using mark filtering sets, the high short of
* lookup_props has the set index.
* match_props has the set index.
*/
if (lookup_props & LookupFlag::UseMarkFilteringSet)
return gdef.mark_set_covers (lookup_props >> 16, glyph);
if (match_props & LookupFlag::UseMarkFilteringSet)
return gdef.mark_set_covers (match_props >> 16, glyph);
/* The second byte of lookup_props has the meaning
/* The second byte of match_props has the meaning
* "ignore marks of attachment type different than
* the attachment type specified."
*/
if (lookup_props & LookupFlag::MarkAttachmentType)
return (lookup_props & LookupFlag::MarkAttachmentType) == (glyph_props & LookupFlag::MarkAttachmentType);
if (match_props & LookupFlag::MarkAttachmentType)
return (match_props & LookupFlag::MarkAttachmentType) == (glyph_props & LookupFlag::MarkAttachmentType);
return true;
}
inline bool
check_glyph_property (const hb_glyph_info_t *info,
unsigned int lookup_props) const
unsigned int match_props) const
{
hb_codepoint_t glyph = info->codepoint;
unsigned int glyph_props = _hb_glyph_info_get_glyph_props (info);
/* Not covered, if, for example, glyph class is ligature and
* lookup_props includes LookupFlags::IgnoreLigatures
* match_props includes LookupFlags::IgnoreLigatures
*/
if (glyph_props & lookup_props & LookupFlag::IgnoreFlags)
if (glyph_props & match_props & LookupFlag::IgnoreFlags)
return false;
if (unlikely (glyph_props & HB_OT_LAYOUT_GLYPH_PROPS_MARK))
return match_properties_mark (glyph, glyph_props, lookup_props);
return match_properties_mark (glyph, glyph_props, match_props);
return true;
}

Loading…
Cancel
Save