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