From d512087e4dfb5d9483b78eaf8443b4fa8724b8e1 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Sat, 14 Sep 2019 10:36:29 +0430 Subject: [PATCH] Rename GlyphID to HBGlyphID Avoid collision with macOS's ATSUnicodeTypes.h GlyphID --- src/hb-aat-layout-bsln-table.hh | 4 +- src/hb-aat-layout-common.hh | 16 ++--- src/hb-aat-layout-just-table.hh | 8 +-- src/hb-aat-layout-kerx-table.hh | 4 +- src/hb-aat-layout-morx-table.hh | 32 +++++----- src/hb-open-type.hh | 4 +- src/hb-ot-cmap-table.hh | 4 +- src/hb-ot-color-cbdt-table.hh | 8 +-- src/hb-ot-color-colr-table.hh | 4 +- src/hb-ot-glyf-table.hh | 2 +- src/hb-ot-layout-base-table.hh | 2 +- src/hb-ot-layout-common.hh | 22 +++---- src/hb-ot-layout-gpos-table.hh | 2 +- src/hb-ot-layout-gsub-table.hh | 72 +++++++++++----------- src/hb-ot-layout-jstf-table.hh | 2 +- src/hb-ot-math-table.hh | 4 +- src/hb-ot-shape-complex-arabic-fallback.hh | 14 ++--- src/hb-ot-vorg-table.hh | 2 +- 18 files changed, 103 insertions(+), 103 deletions(-) diff --git a/src/hb-aat-layout-bsln-table.hh b/src/hb-aat-layout-bsln-table.hh index 9139d2818..15ef2da65 100644 --- a/src/hb-aat-layout-bsln-table.hh +++ b/src/hb-aat-layout-bsln-table.hh @@ -82,7 +82,7 @@ struct BaselineTableFormat2Part } protected: - GlyphID stdGlyph; /* The specific glyph index number in this + HBGlyphID stdGlyph; /* The specific glyph index number in this * font that is used to set the baseline values. * This is the standard glyph. * This glyph must contain a set of control points @@ -105,7 +105,7 @@ struct BaselineTableFormat3Part } protected: - GlyphID stdGlyph; /* ditto */ + HBGlyphID stdGlyph; /* ditto */ HBUINT16 ctlPoints[32]; /* ditto */ Lookup lookupTable; /* Lookup table that maps glyphs to their diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index e4851ce08..473f2cdcd 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -93,8 +93,8 @@ struct LookupSegmentSingle return_trace (c->check_struct (this) && value.sanitize (c, base)); } - GlyphID last; /* Last GlyphID in this segment */ - GlyphID first; /* First GlyphID in this segment */ + HBGlyphID last; /* Last GlyphID in this segment */ + HBGlyphID first; /* First GlyphID in this segment */ T value; /* The lookup value (only one) */ public: DEFINE_SIZE_STATIC (4 + T::static_size); @@ -162,8 +162,8 @@ struct LookupSegmentArray valuesZ.sanitize (c, base, last - first + 1, hb_forward (ds)...)); } - GlyphID last; /* Last GlyphID in this segment */ - GlyphID first; /* First GlyphID in this segment */ + HBGlyphID last; /* Last GlyphID in this segment */ + HBGlyphID first; /* First GlyphID in this segment */ NNOffsetTo> valuesZ; /* A 16-bit offset from the start of * the table to the data. */ @@ -222,7 +222,7 @@ struct LookupSingle return_trace (c->check_struct (this) && value.sanitize (c, base)); } - GlyphID glyph; /* Last GlyphID */ + HBGlyphID glyph; /* Last GlyphID */ T value; /* The lookup value (only one) */ public: DEFINE_SIZE_STATIC (2 + T::static_size); @@ -284,7 +284,7 @@ struct LookupFormat8 protected: HBUINT16 format; /* Format identifier--format = 8 */ - GlyphID firstGlyph; /* First glyph index included in the trimmed array. */ + HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */ HBUINT16 glyphCount; /* Total number of glyphs (equivalent to the last * glyph minus the value of firstGlyph plus 1). */ UnsizedArrayOf @@ -326,7 +326,7 @@ struct LookupFormat10 protected: HBUINT16 format; /* Format identifier--format = 8 */ HBUINT16 valueSize; /* Byte size of each value. */ - GlyphID firstGlyph; /* First glyph index included in the trimmed array. */ + HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */ HBUINT16 glyphCount; /* Total number of glyphs (equivalent to the last * glyph minus the value of firstGlyph plus 1). */ UnsizedArrayOf @@ -658,7 +658,7 @@ struct ClassTable return_trace (c->check_struct (this) && classArray.sanitize (c)); } protected: - GlyphID firstGlyph; /* First glyph index included in the trimmed array. */ + HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */ ArrayOf classArray; /* The class codes (indexed by glyph index minus * firstGlyph). */ public: diff --git a/src/hb-aat-layout-just-table.hh b/src/hb-aat-layout-just-table.hh index fb542458f..e1787d10c 100644 --- a/src/hb-aat-layout-just-table.hh +++ b/src/hb-aat-layout-just-table.hh @@ -100,7 +100,7 @@ struct UnconditionalAddGlyphAction protected: ActionSubrecordHeader header; - GlyphID addGlyph; /* Glyph that should be added if the distance factor + HBGlyphID addGlyph; /* Glyph that should be added if the distance factor * is growing. */ public: @@ -121,11 +121,11 @@ struct ConditionalAddGlyphAction HBFixed substThreshold; /* Distance growth factor (in ems) at which * this glyph is replaced and the growth factor * recalculated. */ - GlyphID addGlyph; /* Glyph to be added as kashida. If this value is + HBGlyphID addGlyph; /* Glyph to be added as kashida. If this value is * 0xFFFF, no extra glyph will be added. Note that * generally when a glyph is added, justification * will need to be redone. */ - GlyphID substGlyph; /* Glyph to be substituted for this glyph if the + HBGlyphID substGlyph; /* Glyph to be substituted for this glyph if the * growth factor equals or exceeds the value of * substThreshold. */ public: @@ -170,7 +170,7 @@ struct RepeatedAddGlyphAction ActionSubrecordHeader header; HBUINT16 flags; /* Currently unused; set to 0. */ - GlyphID glyph; /* Glyph that should be added if the distance factor + HBGlyphID glyph; /* Glyph that should be added if the distance factor * is growing. */ public: DEFINE_SIZE_STATIC (10); diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index c1d8815ae..8026b4ef1 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -82,8 +82,8 @@ struct KernPair } protected: - GlyphID left; - GlyphID right; + HBGlyphID left; + HBGlyphID right; FWORD value; public: DEFINE_SIZE_STATIC (6); diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index b4ce9f99c..d8df579f5 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -240,21 +240,21 @@ struct ContextualSubtable if (buffer->idx == buffer->len && !mark_set) return; - const GlyphID *replacement; + const HBGlyphID *replacement; replacement = nullptr; if (Types::extended) { if (entry.data.markIndex != 0xFFFF) { - const Lookup &lookup = subs[entry.data.markIndex]; + const Lookup &lookup = subs[entry.data.markIndex]; replacement = lookup.get_value (buffer->info[mark].codepoint, driver->num_glyphs); } } else { unsigned int offset = entry.data.markIndex + buffer->info[mark].codepoint; - const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; + const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)]; if (!replacement->sanitize (&c->sanitizer) || !*replacement) replacement = nullptr; @@ -272,14 +272,14 @@ struct ContextualSubtable { if (entry.data.currentIndex != 0xFFFF) { - const Lookup &lookup = subs[entry.data.currentIndex]; + const Lookup &lookup = subs[entry.data.currentIndex]; replacement = lookup.get_value (buffer->info[idx].codepoint, driver->num_glyphs); } } else { unsigned int offset = entry.data.currentIndex + buffer->info[idx].codepoint; - const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; + const UnsizedArrayOf &subs_old = (const UnsizedArrayOf &) subs; replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)]; if (!replacement->sanitize (&c->sanitizer) || !*replacement) replacement = nullptr; @@ -304,7 +304,7 @@ struct ContextualSubtable bool mark_set; unsigned int mark; const ContextualSubtable *table; - const UnsizedOffsetListOf, HBUINT, false> &subs; + const UnsizedOffsetListOf, HBUINT, false> &subs; }; bool apply (hb_aat_apply_context_t *c) const @@ -348,7 +348,7 @@ struct ContextualSubtable protected: StateTable machine; - NNOffsetTo, HBUINT, false>, HBUINT> + NNOffsetTo, HBUINT, false>, HBUINT> substitutionTables; public: DEFINE_SIZE_STATIC (20); @@ -520,7 +520,7 @@ struct LigatureSubtable if (action & (LigActionStore | LigActionLast)) { ligature_idx = Types::offsetToIndex (ligature_idx, table, ligature.arrayZ); - const GlyphID &ligatureData = ligature[ligature_idx]; + const HBGlyphID &ligatureData = ligature[ligature_idx]; if (unlikely (!ligatureData.sanitize (&c->sanitizer))) break; hb_codepoint_t lig = ligatureData; @@ -554,7 +554,7 @@ struct LigatureSubtable const LigatureSubtable *table; const UnsizedArrayOf &ligAction; const UnsizedArrayOf &component; - const UnsizedArrayOf &ligature; + const UnsizedArrayOf &ligature; unsigned int match_length; unsigned int match_positions[HB_MAX_CONTEXT_LENGTH]; }; @@ -586,7 +586,7 @@ struct LigatureSubtable ligAction; /* Offset to the ligature action table. */ NNOffsetTo, HBUINT> component; /* Offset to the component table. */ - NNOffsetTo, HBUINT> + NNOffsetTo, HBUINT> ligature; /* Offset to the actual ligature lists. */ public: DEFINE_SIZE_STATIC (28); @@ -606,7 +606,7 @@ struct NoncontextualSubtable unsigned int count = c->buffer->len; for (unsigned int i = 0; i < count; i++) { - const GlyphID *replacement = substitute.get_value (info[i].codepoint, num_glyphs); + const HBGlyphID *replacement = substitute.get_value (info[i].codepoint, num_glyphs); if (replacement) { info[i].codepoint = *replacement; @@ -624,7 +624,7 @@ struct NoncontextualSubtable } protected: - Lookup substitute; + Lookup substitute; public: DEFINE_SIZE_MIN (2); }; @@ -726,7 +726,7 @@ struct InsertionSubtable { unsigned int count = (flags & MarkedInsertCount); unsigned int start = entry.data.markedInsertIndex; - const GlyphID *glyphs = &insertionAction[start]; + const HBGlyphID *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; bool before = flags & MarkedInsertBefore; @@ -754,7 +754,7 @@ struct InsertionSubtable { unsigned int count = (flags & CurrentInsertCount) >> 5; unsigned int start = entry.data.currentInsertIndex; - const GlyphID *glyphs = &insertionAction[start]; + const HBGlyphID *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; bool before = flags & CurrentInsertBefore; @@ -793,7 +793,7 @@ struct InsertionSubtable private: hb_aat_apply_context_t *c; unsigned int mark; - const UnsizedArrayOf &insertionAction; + const UnsizedArrayOf &insertionAction; }; bool apply (hb_aat_apply_context_t *c) const @@ -819,7 +819,7 @@ struct InsertionSubtable protected: StateTable machine; - NNOffsetTo, HBUINT> + NNOffsetTo, HBUINT> insertionAction; /* Byte offset from stateHeader to the start of * the insertion glyph table. */ public: diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index f95f8cb65..fce559103 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -163,9 +163,9 @@ struct Tag : HBUINT32 }; /* Glyph index number, same as uint16 (length = 16 bits) */ -struct GlyphID : HBUINT16 +struct HBGlyphID : HBUINT16 { - GlyphID& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; } + HBGlyphID& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; } }; /* Script/language-system/feature index */ diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 48ce8813a..309515f67 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -498,7 +498,7 @@ struct CmapSubtableTrimmed UINT length; /* Byte length of this subtable. */ UINT language; /* Ignore. */ UINT startCharCode; /* First character code covered. */ - ArrayOf + ArrayOf glyphIdArray; /* Array of glyph index values for character * codes in the range. */ public: @@ -694,7 +694,7 @@ struct UVSMapping } HBUINT24 unicodeValue; /* Base Unicode value of the UVS */ - GlyphID glyphID; /* Glyph ID of the UVS */ + HBGlyphID glyphID; /* Glyph ID of the UVS */ public: DEFINE_SIZE_STATIC (5); }; diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh index e85e4ad3c..2a873594a 100644 --- a/src/hb-ot-color-cbdt-table.hh +++ b/src/hb-ot-color-cbdt-table.hh @@ -226,8 +226,8 @@ struct IndexSubtableRecord offset, length, format); } - GlyphID firstGlyphIndex; - GlyphID lastGlyphIndex; + HBGlyphID firstGlyphIndex; + HBGlyphID lastGlyphIndex; LOffsetTo offsetToSubtable; public: DEFINE_SIZE_STATIC(8); @@ -290,8 +290,8 @@ struct BitmapSizeTable HBUINT32 colorRef; SBitLineMetrics horizontal; SBitLineMetrics vertical; - GlyphID startGlyphIndex; - GlyphID endGlyphIndex; + HBGlyphID startGlyphIndex; + HBGlyphID endGlyphIndex; HBUINT8 ppemX; HBUINT8 ppemY; HBUINT8 bitDepth; diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index 3447b144d..e2ed7c654 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -48,7 +48,7 @@ struct LayerRecord } protected: - GlyphID glyphId; /* Glyph ID of layer glyph */ + HBGlyphID glyphId; /* Glyph ID of layer glyph */ Index colorIdx; /* Index value to use with a * selected color palette. * An index value of 0xFFFF @@ -75,7 +75,7 @@ struct BaseGlyphRecord } public: - GlyphID glyphId; /* Glyph ID of reference glyph */ + HBGlyphID glyphId; /* Glyph ID of reference glyph */ HBUINT16 firstLayerIdx; /* Index (from beginning of * the Layer Records) to the * layer record. There will be diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 3dc3e27c8..7446f9489 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -330,7 +330,7 @@ struct glyf }; HBUINT16 flags; - GlyphID glyphIndex; + HBGlyphID glyphIndex; unsigned int get_size () const { diff --git a/src/hb-ot-layout-base-table.hh b/src/hb-ot-layout-base-table.hh index 7c00a1313..02fe14fa0 100644 --- a/src/hb-ot-layout-base-table.hh +++ b/src/hb-ot-layout-base-table.hh @@ -73,7 +73,7 @@ struct BaseCoordFormat2 protected: HBUINT16 format; /* Format identifier--format = 2 */ FWORD coordinate; /* X or Y value, in design units */ - GlyphID referenceGlyph; /* Glyph ID of control glyph */ + HBGlyphID referenceGlyph; /* Glyph ID of control glyph */ HBUINT16 coordPoint; /* Index of contour point on the * reference glyph */ public: diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 388b31634..6d349e242 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -172,8 +172,8 @@ struct RangeRecord bool add_coverage (set_t *glyphs) const { return glyphs->add_range (start, end); } - GlyphID start; /* First GlyphID in the range */ - GlyphID end; /* Last GlyphID in the range */ + HBGlyphID start; /* First GlyphID in the range */ + HBGlyphID end; /* Last GlyphID in the range */ HBUINT16 value; /* Value */ public: DEFINE_SIZE_STATIC (6); @@ -856,7 +856,7 @@ struct CoverageFormat1 protected: HBUINT16 coverageFormat; /* Format identifier--format = 1 */ - SortedArrayOf + SortedArrayOf glyphArray; /* Array of GlyphIDs--in numerical order */ public: DEFINE_SIZE_ARRAY (4, glyphArray); @@ -1196,7 +1196,7 @@ struct Coverage */ static inline void ClassDef_serialize (hb_serialize_context_t *c, - hb_array_t glyphs, + hb_array_t glyphs, hb_array_t klasses); struct ClassDefFormat1 @@ -1210,7 +1210,7 @@ struct ClassDefFormat1 } bool serialize (hb_serialize_context_t *c, - hb_array_t glyphs, + hb_array_t glyphs, hb_array_t klasses) { TRACE_SERIALIZE (this); @@ -1241,7 +1241,7 @@ struct ClassDefFormat1 TRACE_SUBSET (this); const hb_set_t &glyphset = *c->plan->glyphset (); const hb_map_t &glyph_map = *c->plan->glyph_map; - hb_sorted_vector_t glyphs; + hb_sorted_vector_t glyphs; hb_vector_t klasses; hb_codepoint_t start = startGlyph; @@ -1328,7 +1328,7 @@ struct ClassDefFormat1 protected: HBUINT16 classFormat; /* Format identifier--format = 1 */ - GlyphID startGlyph; /* First GlyphID of the classValueArray */ + HBGlyphID startGlyph; /* First GlyphID of the classValueArray */ ArrayOf classValue; /* Array of Class Values--one per GlyphID */ public: @@ -1346,7 +1346,7 @@ struct ClassDefFormat2 } bool serialize (hb_serialize_context_t *c, - hb_array_t glyphs, + hb_array_t glyphs, hb_array_t klasses) { TRACE_SERIALIZE (this); @@ -1390,7 +1390,7 @@ struct ClassDefFormat2 TRACE_SUBSET (this); const hb_set_t &glyphset = *c->plan->glyphset (); const hb_map_t &glyph_map = *c->plan->glyph_map; - hb_vector_t glyphs; + hb_vector_t glyphs; hb_vector_t klasses; unsigned int count = rangeRecord.len; @@ -1506,7 +1506,7 @@ struct ClassDef } bool serialize (hb_serialize_context_t *c, - hb_array_t glyphs, + hb_array_t glyphs, hb_array_t klasses) { TRACE_SERIALIZE (this); @@ -1611,7 +1611,7 @@ struct ClassDef }; static inline void ClassDef_serialize (hb_serialize_context_t *c, - hb_array_t glyphs, + hb_array_t glyphs, hb_array_t klasses) { c->start_embed ()->serialize (c, glyphs, klasses); } diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index b8dd9813b..8cdfb57bd 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -750,7 +750,7 @@ struct PairValueRecord friend struct PairSet; protected: - GlyphID secondGlyph; /* GlyphID of second glyph in the + HBGlyphID secondGlyph; /* GlyphID of second glyph in the * pair--first glyph is listed in the * Coverage table */ ValueRecord values; /* Positioning data for the first glyph diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index db5af8337..a2722ade9 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -212,7 +212,7 @@ struct SingleSubstFormat2 + hb_zip (this+coverage, substitute) | hb_filter (glyphset, hb_first) | hb_filter (glyphset, hb_second) - | hb_map_retains_sorting ([&] (hb_pair_t p) -> hb_codepoint_pair_t + | hb_map_retains_sorting ([&] (hb_pair_t p) -> hb_codepoint_pair_t { return hb_pair (glyph_map[p.first], glyph_map[p.second]); }) ; @@ -232,7 +232,7 @@ struct SingleSubstFormat2 OffsetTo coverage; /* Offset to Coverage table--from * beginning of Substitution table */ - ArrayOf + ArrayOf substitute; /* Array of substitute * GlyphIDs--ordered by Coverage Index */ public: @@ -374,7 +374,7 @@ struct Sequence } protected: - ArrayOf + ArrayOf substitute; /* String of GlyphIDs to substitute */ public: DEFINE_SIZE_ARRAY (2, substitute); @@ -421,9 +421,9 @@ struct MultipleSubstFormat1 } bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t substitute_len_list, - hb_array_t substitute_glyphs_list) + hb_array_t substitute_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false); @@ -496,9 +496,9 @@ struct MultipleSubstFormat1 struct MultipleSubst { bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t substitute_len_list, - hb_array_t substitute_glyphs_list) + hb_array_t substitute_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (u.format))) return_trace (false); @@ -597,7 +597,7 @@ struct AlternateSet } protected: - ArrayOf + ArrayOf alternates; /* Array of alternate GlyphIDs--in * arbitrary order */ public: @@ -644,9 +644,9 @@ struct AlternateSubstFormat1 } bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t alternate_len_list, - hb_array_t alternate_glyphs_list) + hb_array_t alternate_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false); @@ -719,9 +719,9 @@ struct AlternateSubstFormat1 struct AlternateSubst { bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t alternate_len_list, - hb_array_t alternate_glyphs_list) + hb_array_t alternate_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (u.format))) return_trace (false); @@ -860,8 +860,8 @@ struct Ligature } protected: - GlyphID ligGlyph; /* GlyphID of ligature to substitute */ - HeadlessArrayOf + HBGlyphID ligGlyph; /* GlyphID of ligature to substitute */ + HeadlessArrayOf component; /* Array of component GlyphIDs--start * with the second component--ordered * in writing direction */ @@ -921,9 +921,9 @@ struct LigatureSet } bool serialize (hb_serialize_context_t *c, - hb_array_t ligatures, + hb_array_t ligatures, hb_array_t component_count_list, - hb_array_t &component_list /* Starting from second for each ligature */) + hb_array_t &component_list /* Starting from second for each ligature */) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false); @@ -1038,11 +1038,11 @@ struct LigatureSubstFormat1 } bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t first_glyphs, + hb_sorted_array_t first_glyphs, hb_array_t ligature_per_first_glyph_count_list, - hb_array_t ligatures_list, + hb_array_t ligatures_list, hb_array_t component_count_list, - hb_array_t component_list /* Starting from second for each ligature */) + hb_array_t component_list /* Starting from second for each ligature */) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false); @@ -1118,11 +1118,11 @@ struct LigatureSubstFormat1 struct LigatureSubst { bool serialize (hb_serialize_context_t *c, - hb_sorted_array_t first_glyphs, + hb_sorted_array_t first_glyphs, hb_array_t ligature_per_first_glyph_count_list, - hb_array_t ligatures_list, + hb_array_t ligatures_list, hb_array_t component_count_list, - hb_array_t component_list /* Starting from second for each ligature */) + hb_array_t component_list /* Starting from second for each ligature */) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (u.format))) return_trace (false); @@ -1199,7 +1199,7 @@ struct ReverseChainSingleSubstFormat1 if (!intersects (c->glyphs)) return; const OffsetArrayOf &lookahead = StructAfter> (backtrack); - const ArrayOf &substitute = StructAfter> (lookahead); + const ArrayOf &substitute = StructAfter> (lookahead); + hb_zip (this+coverage, substitute) | hb_filter (*c->glyphs, hb_first) @@ -1223,7 +1223,7 @@ struct ReverseChainSingleSubstFormat1 for (unsigned int i = 0; i < count; i++) if (unlikely (!(this+lookahead[i]).add_coverage (c->after))) return; - const ArrayOf &substitute = StructAfter> (lookahead); + const ArrayOf &substitute = StructAfter> (lookahead); count = substitute.len; c->output->add_array (substitute.arrayZ, substitute.len); } @@ -1243,7 +1243,7 @@ struct ReverseChainSingleSubstFormat1 if (likely (index == NOT_COVERED)) return_trace (false); const OffsetArrayOf &lookahead = StructAfter> (backtrack); - const ArrayOf &substitute = StructAfter> (lookahead); + const ArrayOf &substitute = StructAfter> (lookahead); unsigned int start_index = 0, end_index = 0; if (match_backtrack (c, @@ -1281,7 +1281,7 @@ struct ReverseChainSingleSubstFormat1 const OffsetArrayOf &lookahead = StructAfter> (backtrack); if (!lookahead.sanitize (c, this)) return_trace (false); - const ArrayOf &substitute = StructAfter> (lookahead); + const ArrayOf &substitute = StructAfter> (lookahead); return_trace (substitute.sanitize (c)); } @@ -1298,7 +1298,7 @@ struct ReverseChainSingleSubstFormat1 lookaheadX; /* Array of coverage tables * in lookahead sequence, in glyph * sequence order */ - ArrayOf + ArrayOf substituteX; /* Array of substitute * GlyphIDs--ordered by Coverage Index */ public: @@ -1453,8 +1453,8 @@ struct SubstLookup : Lookup bool serialize_single (hb_serialize_context_t *c, uint32_t lookup_props, - hb_sorted_array_t glyphs, - hb_array_t substitutes) + hb_sorted_array_t glyphs, + hb_array_t substitutes) { TRACE_SERIALIZE (this); if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false); @@ -1464,9 +1464,9 @@ struct SubstLookup : Lookup bool serialize_multiple (hb_serialize_context_t *c, uint32_t lookup_props, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t substitute_len_list, - hb_array_t substitute_glyphs_list) + hb_array_t substitute_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false); @@ -1479,9 +1479,9 @@ struct SubstLookup : Lookup bool serialize_alternate (hb_serialize_context_t *c, uint32_t lookup_props, - hb_sorted_array_t glyphs, + hb_sorted_array_t glyphs, hb_array_t alternate_len_list, - hb_array_t alternate_glyphs_list) + hb_array_t alternate_glyphs_list) { TRACE_SERIALIZE (this); if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false); @@ -1494,11 +1494,11 @@ struct SubstLookup : Lookup bool serialize_ligature (hb_serialize_context_t *c, uint32_t lookup_props, - hb_sorted_array_t first_glyphs, + hb_sorted_array_t first_glyphs, hb_array_t ligature_per_first_glyph_count_list, - hb_array_t ligatures_list, + hb_array_t ligatures_list, hb_array_t component_count_list, - hb_array_t component_list /* Starting from second for each ligature */) + hb_array_t component_list /* Starting from second for each ligature */) { TRACE_SERIALIZE (this); if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false); diff --git a/src/hb-ot-layout-jstf-table.hh b/src/hb-ot-layout-jstf-table.hh index 1dd31d5b0..53eb623cf 100644 --- a/src/hb-ot-layout-jstf-table.hh +++ b/src/hb-ot-layout-jstf-table.hh @@ -136,7 +136,7 @@ struct JstfLangSys : OffsetListOf * ExtenderGlyphs -- Extender Glyph Table */ -typedef SortedArrayOf ExtenderGlyphs; +typedef SortedArrayOf ExtenderGlyphs; /* diff --git a/src/hb-ot-math-table.hh b/src/hb-ot-math-table.hh index b4592ccde..7529e0c08 100644 --- a/src/hb-ot-math-table.hh +++ b/src/hb-ot-math-table.hh @@ -423,7 +423,7 @@ struct MathGlyphVariantRecord } protected: - GlyphID variantGlyph; /* Glyph ID for the variant. */ + HBGlyphID variantGlyph; /* Glyph ID for the variant. */ HBUINT16 advanceMeasurement; /* Advance width/height, in design units, of the * variant, in the direction of requested * glyph extension. */ @@ -471,7 +471,7 @@ struct MathGlyphPartRecord } protected: - GlyphID glyph; /* Glyph ID for the part. */ + HBGlyphID glyph; /* Glyph ID for the part. */ HBUINT16 startConnectorLength; /* Advance width/ height of the straight bar * connector material, in design units, is at * the beginning of the glyph, in the diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh index ecf345049..bb0141d10 100644 --- a/src/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/hb-ot-shape-complex-arabic-fallback.hh @@ -49,8 +49,8 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS hb_font_t *font, unsigned int feature_index) { - OT::GlyphID glyphs[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1]; - OT::GlyphID substitutes[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1]; + OT::HBGlyphID glyphs[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1]; + OT::HBGlyphID substitutes[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1]; unsigned int num_glyphs = 0; /* Populate arrays */ @@ -78,7 +78,7 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS /* Bubble-sort or something equally good! * May not be good-enough for presidential candidate interviews, but good-enough for us... */ hb_stable_sort (&glyphs[0], num_glyphs, - (int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::GlyphID::cmp, + (int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::HBGlyphID::cmp, &substitutes[0]); @@ -99,15 +99,15 @@ static OT::SubstLookup * arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font) { - OT::GlyphID first_glyphs[ARRAY_LENGTH_CONST (ligature_table)]; + OT::HBGlyphID first_glyphs[ARRAY_LENGTH_CONST (ligature_table)]; unsigned int first_glyphs_indirection[ARRAY_LENGTH_CONST (ligature_table)]; unsigned int ligature_per_first_glyph_count_list[ARRAY_LENGTH_CONST (first_glyphs)]; unsigned int num_first_glyphs = 0; /* We know that all our ligatures are 2-component */ - OT::GlyphID ligature_list[ARRAY_LENGTH_CONST (first_glyphs) * ARRAY_LENGTH_CONST(ligature_table[0].ligatures)]; + OT::HBGlyphID ligature_list[ARRAY_LENGTH_CONST (first_glyphs) * ARRAY_LENGTH_CONST(ligature_table[0].ligatures)]; unsigned int component_count_list[ARRAY_LENGTH_CONST (ligature_list)]; - OT::GlyphID component_list[ARRAY_LENGTH_CONST (ligature_list) * 1/* One extra component per ligature */]; + OT::HBGlyphID component_list[ARRAY_LENGTH_CONST (ligature_list) * 1/* One extra component per ligature */]; unsigned int num_ligatures = 0; /* Populate arrays */ @@ -125,7 +125,7 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN num_first_glyphs++; } hb_stable_sort (&first_glyphs[0], num_first_glyphs, - (int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::GlyphID::cmp, + (int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::HBGlyphID::cmp, &first_glyphs_indirection[0]); /* Now that the first-glyphs are sorted, walk again, populate ligatures. */ diff --git a/src/hb-ot-vorg-table.hh b/src/hb-ot-vorg-table.hh index e1b25f999..1b6801a4f 100644 --- a/src/hb-ot-vorg-table.hh +++ b/src/hb-ot-vorg-table.hh @@ -48,7 +48,7 @@ struct VertOriginMetric } public: - GlyphID glyph; + HBGlyphID glyph; FWORD vertOriginY; public: