|
|
|
@ -138,7 +138,7 @@ _hb_ot_layout_get_glyph_property (hb_face_t *face, |
|
|
|
|
hb_bool_t |
|
|
|
|
_hb_ot_layout_check_glyph_property (hb_face_t *face, |
|
|
|
|
hb_glyph_info_t *ginfo, |
|
|
|
|
unsigned int lookup_flags, |
|
|
|
|
unsigned int lookup_props, |
|
|
|
|
unsigned int *property_out) |
|
|
|
|
{ |
|
|
|
|
unsigned int property; |
|
|
|
@ -148,25 +148,25 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face, |
|
|
|
|
*property_out = property; |
|
|
|
|
|
|
|
|
|
/* Not covered, if, for example, glyph class is ligature and
|
|
|
|
|
* lookup_flags includes LookupFlags::IgnoreLigatures |
|
|
|
|
* lookup_props includes LookupFlags::IgnoreLigatures |
|
|
|
|
*/ |
|
|
|
|
if (property & lookup_flags & LookupFlag::IgnoreFlags) |
|
|
|
|
if (property & lookup_props & LookupFlag::IgnoreFlags) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
if (property & HB_OT_LAYOUT_GLYPH_CLASS_MARK) |
|
|
|
|
{ |
|
|
|
|
/* If using mark filtering sets, the high short of
|
|
|
|
|
* lookup_flags has the set index. |
|
|
|
|
* lookup_props has the set index. |
|
|
|
|
*/ |
|
|
|
|
if (lookup_flags & LookupFlag::UseMarkFilteringSet) |
|
|
|
|
return _get_gdef (face).mark_set_covers (lookup_flags >> 16, ginfo->codepoint); |
|
|
|
|
if (lookup_props & LookupFlag::UseMarkFilteringSet) |
|
|
|
|
return _get_gdef (face).mark_set_covers (lookup_props >> 16, ginfo->codepoint); |
|
|
|
|
|
|
|
|
|
/* The second byte of lookup_flags has the meaning
|
|
|
|
|
/* The second byte of lookup_props has the meaning
|
|
|
|
|
* "ignore marks of attachment type different than |
|
|
|
|
* the attachment type specified." |
|
|
|
|
*/ |
|
|
|
|
if (lookup_flags & LookupFlag::MarkAttachmentType && property & LookupFlag::MarkAttachmentType) |
|
|
|
|
return (lookup_flags & LookupFlag::MarkAttachmentType) == (property & LookupFlag::MarkAttachmentType); |
|
|
|
|
if (lookup_props & LookupFlag::MarkAttachmentType && property & LookupFlag::MarkAttachmentType) |
|
|
|
|
return (lookup_props & LookupFlag::MarkAttachmentType) == (property & LookupFlag::MarkAttachmentType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
@ -175,7 +175,7 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face, |
|
|
|
|
hb_bool_t |
|
|
|
|
_hb_ot_layout_skip_mark (hb_face_t *face, |
|
|
|
|
hb_glyph_info_t *ginfo, |
|
|
|
|
unsigned int lookup_flags, |
|
|
|
|
unsigned int lookup_props, |
|
|
|
|
unsigned int *property_out) |
|
|
|
|
{ |
|
|
|
|
unsigned int property; |
|
|
|
@ -186,18 +186,18 @@ _hb_ot_layout_skip_mark (hb_face_t *face, |
|
|
|
|
|
|
|
|
|
if (property & HB_OT_LAYOUT_GLYPH_CLASS_MARK) |
|
|
|
|
{ |
|
|
|
|
/* Skip mark if lookup_flags includes LookupFlags::IgnoreMarks */ |
|
|
|
|
if (lookup_flags & LookupFlag::IgnoreMarks) |
|
|
|
|
/* Skip mark if lookup_props includes LookupFlags::IgnoreMarks */ |
|
|
|
|
if (lookup_props & LookupFlag::IgnoreMarks) |
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
/* If using mark filtering sets, the high short of lookup_flags has the set index. */ |
|
|
|
|
if (lookup_flags & LookupFlag::UseMarkFilteringSet) |
|
|
|
|
return !_get_gdef (face).mark_set_covers (lookup_flags >> 16, ginfo->codepoint); |
|
|
|
|
/* If using mark filtering sets, the high short of lookup_props has the set index. */ |
|
|
|
|
if (lookup_props & LookupFlag::UseMarkFilteringSet) |
|
|
|
|
return !_get_gdef (face).mark_set_covers (lookup_props >> 16, ginfo->codepoint); |
|
|
|
|
|
|
|
|
|
/* The second byte of lookup_flags has the meaning "ignore marks of attachment type
|
|
|
|
|
/* The second byte of lookup_props has the meaning "ignore marks of attachment type
|
|
|
|
|
* different than the attachment type specified." */ |
|
|
|
|
if (lookup_flags & LookupFlag::MarkAttachmentType && property & LookupFlag::MarkAttachmentType) |
|
|
|
|
return (lookup_flags & LookupFlag::MarkAttachmentType) != (property & LookupFlag::MarkAttachmentType); |
|
|
|
|
if (lookup_props & LookupFlag::MarkAttachmentType && property & LookupFlag::MarkAttachmentType) |
|
|
|
|
return (lookup_props & LookupFlag::MarkAttachmentType) != (property & LookupFlag::MarkAttachmentType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|