Rename HBGlyphID to HBGlyphID16
This commit is contained in:
parent
74f96d9d4b
commit
c852b86841
|
@ -4782,7 +4782,7 @@ hb
|
|||
HB
|
||||
HBASELINE
|
||||
HBFixed
|
||||
HBGlyphID
|
||||
HBGlyphID16
|
||||
HBINT
|
||||
hbot
|
||||
hbotABCD
|
||||
|
|
|
@ -82,7 +82,7 @@ struct BaselineTableFormat2Part
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID stdGlyph; /* The specific glyph index number in this
|
||||
HBGlyphID16 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:
|
||||
HBGlyphID stdGlyph; /* ditto */
|
||||
HBGlyphID16 stdGlyph; /* ditto */
|
||||
HBUINT16 ctlPoints[32]; /* ditto */
|
||||
Lookup<HBUINT16>
|
||||
lookupTable; /* Lookup table that maps glyphs to their
|
||||
|
|
|
@ -96,8 +96,8 @@ struct LookupSegmentSingle
|
|||
return_trace (c->check_struct (this) && value.sanitize (c, base));
|
||||
}
|
||||
|
||||
HBGlyphID last; /* Last GlyphID in this segment */
|
||||
HBGlyphID first; /* First GlyphID in this segment */
|
||||
HBGlyphID16 last; /* Last GlyphID in this segment */
|
||||
HBGlyphID16 first; /* First GlyphID in this segment */
|
||||
T value; /* The lookup value (only one) */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (4 + T::static_size);
|
||||
|
@ -165,8 +165,8 @@ struct LookupSegmentArray
|
|||
valuesZ.sanitize (c, base, last - first + 1, hb_forward<Ts> (ds)...));
|
||||
}
|
||||
|
||||
HBGlyphID last; /* Last GlyphID in this segment */
|
||||
HBGlyphID first; /* First GlyphID in this segment */
|
||||
HBGlyphID16 last; /* Last GlyphID in this segment */
|
||||
HBGlyphID16 first; /* First GlyphID in this segment */
|
||||
NNOffset16To<UnsizedArrayOf<T>>
|
||||
valuesZ; /* A 16-bit offset from the start of
|
||||
* the table to the data. */
|
||||
|
@ -225,7 +225,7 @@ struct LookupSingle
|
|||
return_trace (c->check_struct (this) && value.sanitize (c, base));
|
||||
}
|
||||
|
||||
HBGlyphID glyph; /* Last GlyphID */
|
||||
HBGlyphID16 glyph; /* Last GlyphID */
|
||||
T value; /* The lookup value (only one) */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (2 + T::static_size);
|
||||
|
@ -287,7 +287,7 @@ struct LookupFormat8
|
|||
|
||||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 8 */
|
||||
HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */
|
||||
HBGlyphID16 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<T>
|
||||
|
@ -329,7 +329,7 @@ struct LookupFormat10
|
|||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 8 */
|
||||
HBUINT16 valueSize; /* Byte size of each value. */
|
||||
HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */
|
||||
HBGlyphID16 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<HBUINT8>
|
||||
|
@ -661,7 +661,7 @@ struct ClassTable
|
|||
return_trace (c->check_struct (this) && classArray.sanitize (c));
|
||||
}
|
||||
protected:
|
||||
HBGlyphID firstGlyph; /* First glyph index included in the trimmed array. */
|
||||
HBGlyphID16 firstGlyph; /* First glyph index included in the trimmed array. */
|
||||
Array16Of<HBUCHAR> classArray; /* The class codes (indexed by glyph index minus
|
||||
* firstGlyph). */
|
||||
public:
|
||||
|
|
|
@ -100,7 +100,7 @@ struct UnconditionalAddGlyphAction
|
|||
protected:
|
||||
ActionSubrecordHeader
|
||||
header;
|
||||
HBGlyphID addGlyph; /* Glyph that should be added if the distance factor
|
||||
HBGlyphID16 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. */
|
||||
HBGlyphID addGlyph; /* Glyph to be added as kashida. If this value is
|
||||
HBGlyphID16 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. */
|
||||
HBGlyphID substGlyph; /* Glyph to be substituted for this glyph if the
|
||||
HBGlyphID16 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. */
|
||||
HBGlyphID glyph; /* Glyph that should be added if the distance factor
|
||||
HBGlyphID16 glyph; /* Glyph that should be added if the distance factor
|
||||
* is growing. */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (10);
|
||||
|
|
|
@ -82,8 +82,8 @@ struct KernPair
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID left;
|
||||
HBGlyphID right;
|
||||
HBGlyphID16 left;
|
||||
HBGlyphID16 right;
|
||||
FWORD value;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (6);
|
||||
|
|
|
@ -243,21 +243,21 @@ struct ContextualSubtable
|
|||
if (buffer->idx == buffer->len && !mark_set)
|
||||
return;
|
||||
|
||||
const HBGlyphID *replacement;
|
||||
const HBGlyphID16 *replacement;
|
||||
|
||||
replacement = nullptr;
|
||||
if (Types::extended)
|
||||
{
|
||||
if (entry.data.markIndex != 0xFFFF)
|
||||
{
|
||||
const Lookup<HBGlyphID> &lookup = subs[entry.data.markIndex];
|
||||
const Lookup<HBGlyphID16> &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<HBGlyphID> &subs_old = (const UnsizedArrayOf<HBGlyphID> &) subs;
|
||||
const UnsizedArrayOf<HBGlyphID16> &subs_old = (const UnsizedArrayOf<HBGlyphID16> &) subs;
|
||||
replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)];
|
||||
if (!replacement->sanitize (&c->sanitizer) || !*replacement)
|
||||
replacement = nullptr;
|
||||
|
@ -278,14 +278,14 @@ struct ContextualSubtable
|
|||
{
|
||||
if (entry.data.currentIndex != 0xFFFF)
|
||||
{
|
||||
const Lookup<HBGlyphID> &lookup = subs[entry.data.currentIndex];
|
||||
const Lookup<HBGlyphID16> &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<HBGlyphID> &subs_old = (const UnsizedArrayOf<HBGlyphID> &) subs;
|
||||
const UnsizedArrayOf<HBGlyphID16> &subs_old = (const UnsizedArrayOf<HBGlyphID16> &) subs;
|
||||
replacement = &subs_old[Types::wordOffsetToIndex (offset, table, subs_old.arrayZ)];
|
||||
if (!replacement->sanitize (&c->sanitizer) || !*replacement)
|
||||
replacement = nullptr;
|
||||
|
@ -315,7 +315,7 @@ struct ContextualSubtable
|
|||
bool has_glyph_classes;
|
||||
unsigned int mark;
|
||||
const ContextualSubtable *table;
|
||||
const UnsizedListOfOffset16To<Lookup<HBGlyphID>, HBUINT, false> &subs;
|
||||
const UnsizedListOfOffset16To<Lookup<HBGlyphID16>, HBUINT, false> &subs;
|
||||
};
|
||||
|
||||
bool apply (hb_aat_apply_context_t *c) const
|
||||
|
@ -359,7 +359,7 @@ struct ContextualSubtable
|
|||
protected:
|
||||
StateTable<Types, EntryData>
|
||||
machine;
|
||||
NNOffsetTo<UnsizedListOfOffset16To<Lookup<HBGlyphID>, HBUINT, false>, HBUINT>
|
||||
NNOffsetTo<UnsizedListOfOffset16To<Lookup<HBGlyphID16>, HBUINT, false>, HBUINT>
|
||||
substitutionTables;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (20);
|
||||
|
@ -531,7 +531,7 @@ struct LigatureSubtable
|
|||
if (action & (LigActionStore | LigActionLast))
|
||||
{
|
||||
ligature_idx = Types::offsetToIndex (ligature_idx, table, ligature.arrayZ);
|
||||
const HBGlyphID &ligatureData = ligature[ligature_idx];
|
||||
const HBGlyphID16 &ligatureData = ligature[ligature_idx];
|
||||
if (unlikely (!ligatureData.sanitize (&c->sanitizer))) break;
|
||||
hb_codepoint_t lig = ligatureData;
|
||||
|
||||
|
@ -565,7 +565,7 @@ struct LigatureSubtable
|
|||
const LigatureSubtable *table;
|
||||
const UnsizedArrayOf<HBUINT32> &ligAction;
|
||||
const UnsizedArrayOf<HBUINT16> &component;
|
||||
const UnsizedArrayOf<HBGlyphID> &ligature;
|
||||
const UnsizedArrayOf<HBGlyphID16> &ligature;
|
||||
unsigned int match_length;
|
||||
unsigned int match_positions[HB_MAX_CONTEXT_LENGTH];
|
||||
};
|
||||
|
@ -597,7 +597,7 @@ struct LigatureSubtable
|
|||
ligAction; /* Offset to the ligature action table. */
|
||||
NNOffsetTo<UnsizedArrayOf<HBUINT16>, HBUINT>
|
||||
component; /* Offset to the component table. */
|
||||
NNOffsetTo<UnsizedArrayOf<HBGlyphID>, HBUINT>
|
||||
NNOffsetTo<UnsizedArrayOf<HBGlyphID16>, HBUINT>
|
||||
ligature; /* Offset to the actual ligature lists. */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (28);
|
||||
|
@ -620,7 +620,7 @@ struct NoncontextualSubtable
|
|||
unsigned int count = c->buffer->len;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
const HBGlyphID *replacement = substitute.get_value (info[i].codepoint, num_glyphs);
|
||||
const HBGlyphID16 *replacement = substitute.get_value (info[i].codepoint, num_glyphs);
|
||||
if (replacement)
|
||||
{
|
||||
info[i].codepoint = *replacement;
|
||||
|
@ -641,7 +641,7 @@ struct NoncontextualSubtable
|
|||
}
|
||||
|
||||
protected:
|
||||
Lookup<HBGlyphID> substitute;
|
||||
Lookup<HBGlyphID16> substitute;
|
||||
public:
|
||||
DEFINE_SIZE_MIN (2);
|
||||
};
|
||||
|
@ -744,7 +744,7 @@ struct InsertionSubtable
|
|||
unsigned int count = (flags & MarkedInsertCount);
|
||||
if (unlikely ((buffer->max_ops -= count) <= 0)) return;
|
||||
unsigned int start = entry.data.markedInsertIndex;
|
||||
const HBGlyphID *glyphs = &insertionAction[start];
|
||||
const HBGlyphID16 *glyphs = &insertionAction[start];
|
||||
if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;
|
||||
|
||||
bool before = flags & MarkedInsertBefore;
|
||||
|
@ -772,7 +772,7 @@ struct InsertionSubtable
|
|||
unsigned int count = (flags & CurrentInsertCount) >> 5;
|
||||
if (unlikely ((buffer->max_ops -= count) <= 0)) return;
|
||||
unsigned int start = entry.data.currentInsertIndex;
|
||||
const HBGlyphID *glyphs = &insertionAction[start];
|
||||
const HBGlyphID16 *glyphs = &insertionAction[start];
|
||||
if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;
|
||||
|
||||
bool before = flags & CurrentInsertBefore;
|
||||
|
@ -810,7 +810,7 @@ struct InsertionSubtable
|
|||
private:
|
||||
hb_aat_apply_context_t *c;
|
||||
unsigned int mark;
|
||||
const UnsizedArrayOf<HBGlyphID> &insertionAction;
|
||||
const UnsizedArrayOf<HBGlyphID16> &insertionAction;
|
||||
};
|
||||
|
||||
bool apply (hb_aat_apply_context_t *c) const
|
||||
|
@ -836,7 +836,7 @@ struct InsertionSubtable
|
|||
protected:
|
||||
StateTable<Types, EntryData>
|
||||
machine;
|
||||
NNOffsetTo<UnsizedArrayOf<HBGlyphID>, HBUINT>
|
||||
NNOffsetTo<UnsizedArrayOf<HBGlyphID16>, HBUINT>
|
||||
insertionAction; /* Byte offset from stateHeader to the start of
|
||||
* the insertion glyph table. */
|
||||
public:
|
||||
|
|
|
@ -182,9 +182,9 @@ struct Tag : HBUINT32
|
|||
};
|
||||
|
||||
/* Glyph index number, same as uint16 (length = 16 bits) */
|
||||
struct HBGlyphID : HBUINT16
|
||||
struct HBGlyphID16 : HBUINT16
|
||||
{
|
||||
HBGlyphID& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; }
|
||||
HBGlyphID16& operator = (uint16_t i) { HBUINT16::operator= (i); return *this; }
|
||||
};
|
||||
|
||||
/* Script/language-system/feature index */
|
||||
|
|
|
@ -604,7 +604,7 @@ struct CmapSubtableTrimmed
|
|||
UINT length; /* Byte length of this subtable. */
|
||||
UINT language; /* Ignore. */
|
||||
UINT startCharCode; /* First character code covered. */
|
||||
ArrayOf<HBGlyphID, UINT>
|
||||
ArrayOf<HBGlyphID16, UINT>
|
||||
glyphIdArray; /* Array of glyph index values for character
|
||||
* codes in the range. */
|
||||
public:
|
||||
|
@ -900,7 +900,7 @@ struct UVSMapping
|
|||
}
|
||||
|
||||
HBUINT24 unicodeValue; /* Base Unicode value of the UVS */
|
||||
HBGlyphID glyphID; /* Glyph ID of the UVS */
|
||||
HBGlyphID16 glyphID; /* Glyph ID of the UVS */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (5);
|
||||
};
|
||||
|
|
|
@ -508,8 +508,8 @@ struct IndexSubtableRecord
|
|||
offset, length, format);
|
||||
}
|
||||
|
||||
HBGlyphID firstGlyphIndex;
|
||||
HBGlyphID lastGlyphIndex;
|
||||
HBGlyphID16 firstGlyphIndex;
|
||||
HBGlyphID16 lastGlyphIndex;
|
||||
Offset32To<IndexSubtable> offsetToSubtable;
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (8);
|
||||
|
@ -679,8 +679,8 @@ struct BitmapSizeTable
|
|||
HBUINT32 colorRef;
|
||||
SBitLineMetrics horizontal;
|
||||
SBitLineMetrics vertical;
|
||||
HBGlyphID startGlyphIndex;
|
||||
HBGlyphID endGlyphIndex;
|
||||
HBGlyphID16 startGlyphIndex;
|
||||
HBGlyphID16 endGlyphIndex;
|
||||
HBUINT8 ppemX;
|
||||
HBUINT8 ppemY;
|
||||
HBUINT8 bitDepth;
|
||||
|
|
|
@ -121,7 +121,7 @@ struct LayerRecord
|
|||
}
|
||||
|
||||
public:
|
||||
HBGlyphID glyphId; /* Glyph ID of layer glyph */
|
||||
HBGlyphID16 glyphId; /* Glyph ID of layer glyph */
|
||||
Index colorIdx; /* Index value to use with a
|
||||
* selected color palette.
|
||||
* An index value of 0xFFFF
|
||||
|
@ -148,7 +148,7 @@ struct BaseGlyphRecord
|
|||
}
|
||||
|
||||
public:
|
||||
HBGlyphID glyphId; /* Glyph ID of reference glyph */
|
||||
HBGlyphID16 glyphId; /* Glyph ID of reference glyph */
|
||||
HBUINT16 firstLayerIdx; /* Index (from beginning of
|
||||
* the Layer Records) to the
|
||||
* layer record. There will be
|
||||
|
@ -797,7 +797,7 @@ struct BaseGlyphV1Record
|
|||
}
|
||||
|
||||
public:
|
||||
HBGlyphID glyphId; /* Glyph ID of reference glyph */
|
||||
HBGlyphID16 glyphId; /* Glyph ID of reference glyph */
|
||||
Offset32To<Paint> paint; /* Offset (from beginning of BaseGlyphV1Record array) to Paint,
|
||||
* Typically PaintColrLayers */
|
||||
public:
|
||||
|
|
|
@ -388,7 +388,7 @@ struct glyf
|
|||
|
||||
protected:
|
||||
HBUINT16 flags;
|
||||
HBGlyphID glyphIndex;
|
||||
HBGlyphID16 glyphIndex;
|
||||
public:
|
||||
DEFINE_SIZE_MIN (4);
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ struct BaseCoordFormat2
|
|||
protected:
|
||||
HBUINT16 format; /* Format identifier--format = 2 */
|
||||
FWORD coordinate; /* X or Y value, in design units */
|
||||
HBGlyphID referenceGlyph; /* Glyph ID of control glyph */
|
||||
HBGlyphID16 referenceGlyph; /* Glyph ID of control glyph */
|
||||
HBUINT16 coordPoint; /* Index of contour point on the
|
||||
* reference glyph */
|
||||
public:
|
||||
|
|
|
@ -89,7 +89,7 @@ static inline void ClassDef_serialize (hb_serialize_context_t *c,
|
|||
|
||||
static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
|
||||
const hb_map_t &gid_klass_map,
|
||||
hb_sorted_vector_t<HBGlyphID> &glyphs,
|
||||
hb_sorted_vector_t<HBGlyphID16> &glyphs,
|
||||
const hb_set_t &klasses,
|
||||
bool use_class_zero,
|
||||
hb_map_t *klass_map /*INOUT*/);
|
||||
|
@ -508,8 +508,8 @@ struct RangeRecord
|
|||
bool collect_coverage (set_t *glyphs) const
|
||||
{ return glyphs->add_range (first, last); }
|
||||
|
||||
HBGlyphID first; /* First GlyphID in the range */
|
||||
HBGlyphID last; /* Last GlyphID in the range */
|
||||
HBGlyphID16 first; /* First GlyphID in the range */
|
||||
HBGlyphID16 last; /* Last GlyphID in the range */
|
||||
HBUINT16 value; /* Value */
|
||||
public:
|
||||
DEFINE_SIZE_STATIC (6);
|
||||
|
@ -1454,7 +1454,7 @@ struct CoverageFormat1
|
|||
|
||||
protected:
|
||||
HBUINT16 coverageFormat; /* Format identifier--format = 1 */
|
||||
SortedArray16Of<HBGlyphID>
|
||||
SortedArray16Of<HBGlyphID16>
|
||||
glyphArray; /* Array of GlyphIDs--in numerical order */
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (4, glyphArray);
|
||||
|
@ -1832,7 +1832,7 @@ Coverage_serialize (hb_serialize_context_t *c,
|
|||
|
||||
static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
|
||||
const hb_map_t &gid_klass_map,
|
||||
hb_sorted_vector_t<HBGlyphID> &glyphs,
|
||||
hb_sorted_vector_t<HBGlyphID16> &glyphs,
|
||||
const hb_set_t &klasses,
|
||||
bool use_class_zero,
|
||||
hb_map_t *klass_map /*INOUT*/)
|
||||
|
@ -1859,7 +1859,7 @@ static void ClassDef_remap_and_serialize (hb_serialize_context_t *c,
|
|||
|
||||
auto it =
|
||||
+ glyphs.iter ()
|
||||
| hb_map_retains_sorting ([&] (const HBGlyphID& gid) -> hb_pair_t<hb_codepoint_t, unsigned>
|
||||
| hb_map_retains_sorting ([&] (const HBGlyphID16& gid) -> hb_pair_t<hb_codepoint_t, unsigned>
|
||||
{
|
||||
unsigned new_klass = klass_map->get (gid_klass_map[gid]);
|
||||
return hb_pair ((hb_codepoint_t)gid, new_klass);
|
||||
|
@ -1926,7 +1926,7 @@ struct ClassDefFormat1
|
|||
const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
|
||||
const hb_map_t &glyph_map = *c->plan->glyph_map;
|
||||
|
||||
hb_sorted_vector_t<HBGlyphID> glyphs;
|
||||
hb_sorted_vector_t<HBGlyphID16> glyphs;
|
||||
hb_set_t orig_klasses;
|
||||
hb_map_t gid_org_klass_map;
|
||||
|
||||
|
@ -2046,7 +2046,7 @@ struct ClassDefFormat1
|
|||
|
||||
protected:
|
||||
HBUINT16 classFormat; /* Format identifier--format = 1 */
|
||||
HBGlyphID startGlyph; /* First GlyphID of the classValueArray */
|
||||
HBGlyphID16 startGlyph; /* First GlyphID of the classValueArray */
|
||||
Array16Of<HBUINT16>
|
||||
classValue; /* Array of Class Values--one per GlyphID */
|
||||
public:
|
||||
|
@ -2128,7 +2128,7 @@ struct ClassDefFormat2
|
|||
const hb_set_t &glyphset = *c->plan->glyphset_gsub ();
|
||||
const hb_map_t &glyph_map = *c->plan->glyph_map;
|
||||
|
||||
hb_sorted_vector_t<HBGlyphID> glyphs;
|
||||
hb_sorted_vector_t<HBGlyphID16> glyphs;
|
||||
hb_set_t orig_klasses;
|
||||
hb_map_t gid_org_klass_map;
|
||||
|
||||
|
|
|
@ -1144,7 +1144,7 @@ struct PairValueRecord
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID secondGlyph; /* GlyphID of second glyph in the
|
||||
HBGlyphID16 secondGlyph; /* GlyphID of second glyph in the
|
||||
* pair--first glyph is listed in the
|
||||
* Coverage table */
|
||||
ValueRecord values; /* Positioning data for the first glyph
|
||||
|
|
|
@ -225,7 +225,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<hb_codepoint_t, const HBGlyphID &> p) -> hb_codepoint_pair_t
|
||||
| hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const HBGlyphID16 &> p) -> hb_codepoint_pair_t
|
||||
{ return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
|
||||
;
|
||||
|
||||
|
@ -245,7 +245,7 @@ struct SingleSubstFormat2
|
|||
Offset16To<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
Array16Of<HBGlyphID>
|
||||
Array16Of<HBGlyphID16>
|
||||
substitute; /* Array of substitute
|
||||
* GlyphIDs--ordered by Coverage Index */
|
||||
public:
|
||||
|
@ -391,7 +391,7 @@ struct Sequence
|
|||
}
|
||||
|
||||
protected:
|
||||
Array16Of<HBGlyphID>
|
||||
Array16Of<HBGlyphID16>
|
||||
substitute; /* String of GlyphIDs to substitute */
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (2, substitute);
|
||||
|
@ -443,9 +443,9 @@ struct MultipleSubstFormat1
|
|||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> substitute_len_list,
|
||||
hb_array_t<const HBGlyphID> substitute_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> substitute_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (this))) return_trace (false);
|
||||
|
@ -504,9 +504,9 @@ struct MultipleSubstFormat1
|
|||
struct MultipleSubst
|
||||
{
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> substitute_len_list,
|
||||
hb_array_t<const HBGlyphID> substitute_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> substitute_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (u.format))) return_trace (false);
|
||||
|
@ -624,7 +624,7 @@ struct AlternateSet
|
|||
}
|
||||
|
||||
protected:
|
||||
Array16Of<HBGlyphID>
|
||||
Array16Of<HBGlyphID16>
|
||||
alternates; /* Array of alternate GlyphIDs--in
|
||||
* arbitrary order */
|
||||
public:
|
||||
|
@ -686,9 +686,9 @@ struct AlternateSubstFormat1
|
|||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> alternate_len_list,
|
||||
hb_array_t<const HBGlyphID> alternate_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> alternate_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (this))) return_trace (false);
|
||||
|
@ -747,9 +747,9 @@ struct AlternateSubstFormat1
|
|||
struct AlternateSubst
|
||||
{
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> alternate_len_list,
|
||||
hb_array_t<const HBGlyphID> alternate_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> alternate_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (u.format))) return_trace (false);
|
||||
|
@ -888,8 +888,8 @@ struct Ligature
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID ligGlyph; /* GlyphID of ligature to substitute */
|
||||
HeadlessArrayOf<HBGlyphID>
|
||||
HBGlyphID16 ligGlyph; /* GlyphID of ligature to substitute */
|
||||
HeadlessArrayOf<HBGlyphID16>
|
||||
component; /* Array of component GlyphIDs--start
|
||||
* with the second component--ordered
|
||||
* in writing direction */
|
||||
|
@ -949,9 +949,9 @@ struct LigatureSet
|
|||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_array_t<const HBGlyphID> ligatures,
|
||||
hb_array_t<const HBGlyphID16> ligatures,
|
||||
hb_array_t<const unsigned int> component_count_list,
|
||||
hb_array_t<const HBGlyphID> &component_list /* Starting from second for each ligature */)
|
||||
hb_array_t<const HBGlyphID16> &component_list /* Starting from second for each ligature */)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (this))) return_trace (false);
|
||||
|
@ -1059,11 +1059,11 @@ struct LigatureSubstFormat1
|
|||
}
|
||||
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> first_glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> first_glyphs,
|
||||
hb_array_t<const unsigned int> ligature_per_first_glyph_count_list,
|
||||
hb_array_t<const HBGlyphID> ligatures_list,
|
||||
hb_array_t<const HBGlyphID16> ligatures_list,
|
||||
hb_array_t<const unsigned int> component_count_list,
|
||||
hb_array_t<const HBGlyphID> component_list /* Starting from second for each ligature */)
|
||||
hb_array_t<const HBGlyphID16> component_list /* Starting from second for each ligature */)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (this))) return_trace (false);
|
||||
|
@ -1125,11 +1125,11 @@ struct LigatureSubstFormat1
|
|||
struct LigatureSubst
|
||||
{
|
||||
bool serialize (hb_serialize_context_t *c,
|
||||
hb_sorted_array_t<const HBGlyphID> first_glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> first_glyphs,
|
||||
hb_array_t<const unsigned int> ligature_per_first_glyph_count_list,
|
||||
hb_array_t<const HBGlyphID> ligatures_list,
|
||||
hb_array_t<const HBGlyphID16> ligatures_list,
|
||||
hb_array_t<const unsigned int> component_count_list,
|
||||
hb_array_t<const HBGlyphID> component_list /* Starting from second for each ligature */)
|
||||
hb_array_t<const HBGlyphID16> component_list /* Starting from second for each ligature */)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!c->extend_min (u.format))) return_trace (false);
|
||||
|
@ -1208,7 +1208,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
if (!intersects (c->glyphs)) return;
|
||||
|
||||
const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
|
||||
const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
|
||||
const Array16Of<HBGlyphID16> &substitute = StructAfter<Array16Of<HBGlyphID16>> (lookahead);
|
||||
|
||||
+ hb_zip (this+coverage, substitute)
|
||||
| hb_filter (c->parent_active_glyphs (), hb_first)
|
||||
|
@ -1234,7 +1234,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
for (unsigned int i = 0; i < count; i++)
|
||||
if (unlikely (!(this+lookahead[i]).collect_coverage (c->after))) return;
|
||||
|
||||
const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
|
||||
const Array16Of<HBGlyphID16> &substitute = StructAfter<Array16Of<HBGlyphID16>> (lookahead);
|
||||
count = substitute.len;
|
||||
c->output->add_array (substitute.arrayZ, substitute.len);
|
||||
}
|
||||
|
@ -1254,7 +1254,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
|
||||
const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
|
||||
const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
|
||||
const Array16Of<HBGlyphID16> &substitute = StructAfter<Array16Of<HBGlyphID16>> (lookahead);
|
||||
|
||||
if (unlikely (index >= substitute.len)) return_trace (false);
|
||||
|
||||
|
@ -1317,7 +1317,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
if (!serialize_coverage_offset_array (c, backtrack_iter)) return_trace (false);
|
||||
if (!serialize_coverage_offset_array (c, lookahead_iter)) return_trace (false);
|
||||
|
||||
auto *substitute_out = c->serializer->start_embed<Array16Of<HBGlyphID>> ();
|
||||
auto *substitute_out = c->serializer->start_embed<Array16Of<HBGlyphID16>> ();
|
||||
auto substitutes =
|
||||
+ coverage_subst_iter
|
||||
| hb_map (hb_second)
|
||||
|
@ -1342,13 +1342,13 @@ struct ReverseChainSingleSubstFormat1
|
|||
const hb_map_t &glyph_map = *c->plan->glyph_map;
|
||||
|
||||
const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
|
||||
const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
|
||||
const Array16Of<HBGlyphID16> &substitute = StructAfter<Array16Of<HBGlyphID16>> (lookahead);
|
||||
|
||||
auto it =
|
||||
+ hb_zip (this+coverage, substitute)
|
||||
| hb_filter (glyphset, hb_first)
|
||||
| hb_filter (glyphset, hb_second)
|
||||
| hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const HBGlyphID &> p) -> hb_codepoint_pair_t
|
||||
| hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const HBGlyphID16 &> p) -> hb_codepoint_pair_t
|
||||
{ return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
|
||||
;
|
||||
|
||||
|
@ -1363,7 +1363,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
const Array16OfOffset16To<Coverage> &lookahead = StructAfter<Array16OfOffset16To<Coverage>> (backtrack);
|
||||
if (!lookahead.sanitize (c, this))
|
||||
return_trace (false);
|
||||
const Array16Of<HBGlyphID> &substitute = StructAfter<Array16Of<HBGlyphID>> (lookahead);
|
||||
const Array16Of<HBGlyphID16> &substitute = StructAfter<Array16Of<HBGlyphID16>> (lookahead);
|
||||
return_trace (substitute.sanitize (c));
|
||||
}
|
||||
|
||||
|
@ -1380,7 +1380,7 @@ struct ReverseChainSingleSubstFormat1
|
|||
lookaheadX; /* Array of coverage tables
|
||||
* in lookahead sequence, in glyph
|
||||
* sequence order */
|
||||
Array16Of<HBGlyphID>
|
||||
Array16Of<HBGlyphID16>
|
||||
substituteX; /* Array of substitute
|
||||
* GlyphIDs--ordered by Coverage Index */
|
||||
public:
|
||||
|
@ -1561,8 +1561,8 @@ struct SubstLookup : Lookup
|
|||
|
||||
bool serialize_single (hb_serialize_context_t *c,
|
||||
uint32_t lookup_props,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_array_t<const HBGlyphID> substitutes)
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const HBGlyphID16> substitutes)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false);
|
||||
|
@ -1577,9 +1577,9 @@ struct SubstLookup : Lookup
|
|||
|
||||
bool serialize_multiple (hb_serialize_context_t *c,
|
||||
uint32_t lookup_props,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> substitute_len_list,
|
||||
hb_array_t<const HBGlyphID> substitute_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> substitute_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!Lookup::serialize (c, SubTable::Multiple, lookup_props, 1))) return_trace (false);
|
||||
|
@ -1598,9 +1598,9 @@ struct SubstLookup : Lookup
|
|||
|
||||
bool serialize_alternate (hb_serialize_context_t *c,
|
||||
uint32_t lookup_props,
|
||||
hb_sorted_array_t<const HBGlyphID> glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> glyphs,
|
||||
hb_array_t<const unsigned int> alternate_len_list,
|
||||
hb_array_t<const HBGlyphID> alternate_glyphs_list)
|
||||
hb_array_t<const HBGlyphID16> alternate_glyphs_list)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!Lookup::serialize (c, SubTable::Alternate, lookup_props, 1))) return_trace (false);
|
||||
|
@ -1620,11 +1620,11 @@ struct SubstLookup : Lookup
|
|||
|
||||
bool serialize_ligature (hb_serialize_context_t *c,
|
||||
uint32_t lookup_props,
|
||||
hb_sorted_array_t<const HBGlyphID> first_glyphs,
|
||||
hb_sorted_array_t<const HBGlyphID16> first_glyphs,
|
||||
hb_array_t<const unsigned int> ligature_per_first_glyph_count_list,
|
||||
hb_array_t<const HBGlyphID> ligatures_list,
|
||||
hb_array_t<const HBGlyphID16> ligatures_list,
|
||||
hb_array_t<const unsigned int> component_count_list,
|
||||
hb_array_t<const HBGlyphID> component_list /* Starting from second for each ligature */)
|
||||
hb_array_t<const HBGlyphID16> component_list /* Starting from second for each ligature */)
|
||||
{
|
||||
TRACE_SERIALIZE (this);
|
||||
if (unlikely (!Lookup::serialize (c, SubTable::Ligature, lookup_props, 1))) return_trace (false);
|
||||
|
|
|
@ -136,7 +136,7 @@ struct JstfLangSys : List16OfOffset16To<JstfPriority>
|
|||
* ExtenderGlyphs -- Extender Glyph Table
|
||||
*/
|
||||
|
||||
typedef SortedArray16Of<HBGlyphID> ExtenderGlyphs;
|
||||
typedef SortedArray16Of<HBGlyphID16> ExtenderGlyphs;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -427,7 +427,7 @@ struct MathGlyphVariantRecord
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID variantGlyph; /* Glyph ID for the variant. */
|
||||
HBGlyphID16 variantGlyph; /* Glyph ID for the variant. */
|
||||
HBUINT16 advanceMeasurement; /* Advance width/height, in design units, of the
|
||||
* variant, in the direction of requested
|
||||
* glyph extension. */
|
||||
|
@ -475,7 +475,7 @@ struct MathGlyphPartRecord
|
|||
}
|
||||
|
||||
protected:
|
||||
HBGlyphID glyph; /* Glyph ID for the part. */
|
||||
HBGlyphID16 glyph; /* Glyph ID for the part. */
|
||||
HBUINT16 startConnectorLength;
|
||||
/* Advance width/ height of the straight bar
|
||||
* connector material, in design units, is at
|
||||
|
|
|
@ -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::HBGlyphID glyphs[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1];
|
||||
OT::HBGlyphID substitutes[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1];
|
||||
OT::HBGlyphID16 glyphs[SHAPING_TABLE_LAST - SHAPING_TABLE_FIRST + 1];
|
||||
OT::HBGlyphID16 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::HBGlyphID::cmp,
|
||||
(int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::HBGlyphID16::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::HBGlyphID first_glyphs[ARRAY_LENGTH_CONST (ligature_table)];
|
||||
OT::HBGlyphID16 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::HBGlyphID ligature_list[ARRAY_LENGTH_CONST (first_glyphs) * ARRAY_LENGTH_CONST(ligature_table[0].ligatures)];
|
||||
OT::HBGlyphID16 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::HBGlyphID component_list[ARRAY_LENGTH_CONST (ligature_list) * 1/* One extra component per ligature */];
|
||||
OT::HBGlyphID16 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::HBGlyphID::cmp,
|
||||
(int(*)(const OT::HBUINT16*, const OT::HBUINT16 *)) OT::HBGlyphID16::cmp,
|
||||
&first_glyphs_indirection[0]);
|
||||
|
||||
/* Now that the first-glyphs are sorted, walk again, populate ligatures. */
|
||||
|
|
|
@ -48,7 +48,7 @@ struct VertOriginMetric
|
|||
}
|
||||
|
||||
public:
|
||||
HBGlyphID glyph;
|
||||
HBGlyphID16 glyph;
|
||||
FWORD vertOriginY;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue