diff --git a/src/OT/glyf/CompositeGlyph.hh b/src/OT/glyf/CompositeGlyph.hh index 0e5e13fbf..d8ef90014 100644 --- a/src/OT/glyf/CompositeGlyph.hh +++ b/src/OT/glyf/CompositeGlyph.hh @@ -9,7 +9,7 @@ namespace OT { namespace glyf_impl { -struct CompositeGlyphChain +struct CompositeGlyphRecord { protected: enum composite_glyph_flag_t @@ -154,9 +154,9 @@ struct CompositeGlyphChain DEFINE_SIZE_MIN (4); }; -struct composite_iter_t : hb_iter_with_fallback_t +struct composite_iter_t : hb_iter_with_fallback_t { - typedef const CompositeGlyphChain *__item_t__; + typedef const CompositeGlyphRecord *__item_t__; composite_iter_t (hb_bytes_t glyph_, __item_t__ current_) : glyph (glyph_), current (nullptr), current_size (0) { @@ -171,7 +171,7 @@ struct composite_iter_t : hb_iter_with_fallback_thas_more ()) { current = nullptr; return; } - set_current (&StructAtOffset (current, current_size)); + set_current (&StructAtOffset (current, current_size)); } composite_iter_t __end__ () const { return composite_iter_t (); } bool operator != (const composite_iter_t& o) const @@ -180,7 +180,7 @@ struct composite_iter_t : hb_iter_with_fallback_t (header)); } + { return composite_iter_t (bytes, &StructAfter (header)); } unsigned int instructions_length (hb_bytes_t bytes) const { unsigned int start = bytes.length; unsigned int end = bytes.length; - const CompositeGlyphChain *last = nullptr; + const CompositeGlyphRecord *last = nullptr; for (auto &item : iter ()) last = &item; if (unlikely (!last)) return 0; @@ -236,7 +236,7 @@ struct CompositeGlyph void drop_hints () { for (const auto &_ : iter ()) - const_cast (_).drop_instructions_flag (); + const_cast (_).drop_instructions_flag (); } /* Chop instructions off the end */ @@ -245,9 +245,9 @@ struct CompositeGlyph void set_overlaps_flag () { - CompositeGlyphChain& glyph_chain = const_cast ( - StructAfter (header)); - if (!bytes.check_range(&glyph_chain, CompositeGlyphChain::min_size)) + CompositeGlyphRecord& glyph_chain = const_cast ( + StructAfter (header)); + if (!bytes.check_range(&glyph_chain, CompositeGlyphRecord::min_size)) return; glyph_chain.set_overlaps_flag (); } diff --git a/src/OT/glyf/SubsetGlyph.hh b/src/OT/glyf/SubsetGlyph.hh index 02f2e2162..124a39054 100644 --- a/src/OT/glyf/SubsetGlyph.hh +++ b/src/OT/glyf/SubsetGlyph.hh @@ -43,7 +43,7 @@ struct SubsetGlyph { hb_codepoint_t new_gid; if (plan->new_gid_for_old_gid (_.get_glyph_index (), &new_gid)) - const_cast (_).set_glyph_index (new_gid); + const_cast (_).set_glyph_index (new_gid); } if (plan->flags & HB_SUBSET_FLAGS_NO_HINTING)