diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-10-21 10:36:19 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-10-21 11:35:13 +0300 |
commit | 7afd76bba62c692108fc403661e8908c17e73a3f (patch) | |
tree | 57e9722b013dfc01ba21598fe4643c784e4f4ffe /thirdparty/harfbuzz/src/OT/Layout/GPOS | |
parent | 72b845b28773dd40adf6f55b226fb732910cbf14 (diff) |
HarfBuzz: Update to version 5.3.1
Diffstat (limited to 'thirdparty/harfbuzz/src/OT/Layout/GPOS')
-rw-r--r-- | thirdparty/harfbuzz/src/OT/Layout/GPOS/GPOS.hh | 2 | ||||
-rw-r--r-- | thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat1.hh | 18 | ||||
-rw-r--r-- | thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat2.hh | 24 |
3 files changed, 42 insertions, 2 deletions
diff --git a/thirdparty/harfbuzz/src/OT/Layout/GPOS/GPOS.hh b/thirdparty/harfbuzz/src/OT/Layout/GPOS/GPOS.hh index 72829377a6..9493ec987e 100644 --- a/thirdparty/harfbuzz/src/OT/Layout/GPOS/GPOS.hh +++ b/thirdparty/harfbuzz/src/OT/Layout/GPOS/GPOS.hh @@ -39,7 +39,7 @@ struct GPOS : GSUBGPOS bool subset (hb_subset_context_t *c) const { - hb_subset_layout_context_t l (c, tableTag, c->plan->gpos_lookups, c->plan->gpos_langsys, c->plan->gpos_features); + hb_subset_layout_context_t l (c, tableTag); return GSUBGPOS::subset<PosLookup> (&l); } diff --git a/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat1.hh b/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat1.hh index 5a9dd58a63..b4c9fc3db0 100644 --- a/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat1.hh +++ b/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat1.hh @@ -80,6 +80,24 @@ struct SinglePosFormat1 return_trace (true); } + bool + position_single (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t gid, + hb_glyph_position_t &pos) const + { + unsigned int index = (this+coverage).get_coverage (gid); + if (likely (index == NOT_COVERED)) return false; + + /* This is ugly... */ + hb_buffer_t buffer; + buffer.props.direction = direction; + OT::hb_ot_apply_context_t c (1, font, &buffer); + + valueFormat.apply_value (&c, this, values, pos); + return true; + } + template<typename Iterator, typename SrcLookup, hb_requires (hb_is_iterator (Iterator))> diff --git a/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat2.hh b/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat2.hh index 8a6e8a42a6..c77951156b 100644 --- a/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat2.hh +++ b/thirdparty/harfbuzz/src/OT/Layout/GPOS/SinglePosFormat2.hh @@ -68,7 +68,7 @@ struct SinglePosFormat2 unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint); if (likely (index == NOT_COVERED)) return_trace (false); - if (likely (index >= valueCount)) return_trace (false); + if (unlikely (index >= valueCount)) return_trace (false); if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { @@ -92,6 +92,28 @@ struct SinglePosFormat2 return_trace (true); } + bool + position_single (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t gid, + hb_glyph_position_t &pos) const + { + unsigned int index = (this+coverage).get_coverage (gid); + if (likely (index == NOT_COVERED)) return false; + if (unlikely (index >= valueCount)) return false; + + /* This is ugly... */ + hb_buffer_t buffer; + buffer.props.direction = direction; + OT::hb_ot_apply_context_t c (1, font, &buffer); + + valueFormat.apply_value (&c, this, + &values[index * valueFormat.get_len ()], + pos); + return true; + } + + template<typename Iterator, typename SrcLookup, hb_requires (hb_is_iterator (Iterator))> |