[aat] Cosmetic changes (#964)

This commit is contained in:
Ebrahim Byagowi 2018-04-11 17:41:24 +04:30 committed by GitHub
parent f8bb582bcc
commit 211da5efdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 36 deletions

View File

@ -52,10 +52,10 @@ struct gcid
HBUINT16 format; /* Data format (set to 0) */
HBUINT32 size; /* Size of the table, including header */
HBUINT16 registry; /* The registry ID */
uint8_t registryName[64];
HBUINT8 registryName[64];
/* The registry name in ASCII */
HBUINT16 order; /* The order ID */
uint8_t orderName[64]; /* The order name in ASCII */
HBUINT8 orderName[64]; /* The order name in ASCII */
HBUINT16 supplementVersion;
/* The supplement version */
ArrayOf<HBUINT16>

View File

@ -66,8 +66,9 @@ struct ankr
protected:
HBUINT16 version; /* Version number (set to zero) */
HBUINT16 flags; /* Flags (currently unused; set to zero) */
LOffsetTo<Lookup<HBUINT16> > lookupTable; /* Offset to the table's lookup table */
LOffsetTo<ArrayOf<Anchor, HBUINT32> >
LOffsetTo<Lookup<HBUINT16> >
lookupTable; /* Offset to the table's lookup table */
LOffsetTo<LArrayOf<Anchor> >
anchors; /* Offset to the glyph data table */
public:

View File

@ -511,11 +511,11 @@ struct StateTable
protected:
HBUINT32 nClasses; /* Number of classes, which is the number of indices
* in a single line in the state array. */
OffsetTo<Lookup<HBUINT16>, HBUINT32>
LOffsetTo<Lookup<HBUINT16> >
classTable; /* Offset to the class table. */
OffsetTo<UnsizedArrayOf<HBUINT16>, HBUINT32>
LOffsetTo<UnsizedArrayOf<HBUINT16> >
stateArrayTable;/* Offset to the state array. */
OffsetTo<UnsizedArrayOf<Entry<Extra> >, HBUINT32>
LOffsetTo<UnsizedArrayOf<Entry<Extra> > >
entryTable; /* Offset to the entry array. */
public:

View File

@ -71,7 +71,7 @@ struct KerxSubTableFormat0
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
c->check_array (records, records[0].static_size, nPairs));
recordsZ.sanitize (c, nPairs));
}
protected:
@ -83,9 +83,10 @@ struct KerxSubTableFormat0
HBUINT32 entrySelector; /* This is calculated as log2 of the largest power of two less
* than or equal to the value of nPairs. */
HBUINT32 rangeShift; /* The value of nPairs minus the largest power of two less than or equal to nPairs. */
KerxFormat0Records records[VAR]; /* VAR=nPairs */
UnsizedArrayOf<KerxFormat0Records>
recordsZ; /* VAR=nPairs */
public:
DEFINE_SIZE_ARRAY (16, records);
DEFINE_SIZE_ARRAY (16, recordsZ);
};
struct KerxSubTableFormat1

View File

@ -462,11 +462,11 @@ struct LigatureSubtable
protected:
StateTable<EntryData> machine;
OffsetTo<UnsizedArrayOf<HBUINT32>, HBUINT32>
LOffsetTo<UnsizedArrayOf<HBUINT32> >
ligAction; /* Offset to the ligature action table. */
OffsetTo<UnsizedArrayOf<HBUINT16>, HBUINT32>
LOffsetTo<UnsizedArrayOf<HBUINT16> >
component; /* Offset to the component table. */
OffsetTo<UnsizedArrayOf<GlyphID>, HBUINT32>
LOffsetTo<UnsizedArrayOf<GlyphID> >
ligature; /* Offset to the actual ligature lists. */
public:
DEFINE_SIZE_STATIC (28);

View File

@ -124,8 +124,8 @@ struct TrackData
protected:
HBUINT16 nTracks; /* Number of separate tracks included in this table. */
HBUINT16 nSizes; /* Number of point sizes included in this table. */
LOffsetTo<UnsizedArrayOf<Fixed> > /* Offset to array[nSizes] of size values. */
sizeTable;
LOffsetTo<UnsizedArrayOf<Fixed> >
sizeTable; /* Offset to array[nSizes] of size values. */
UnsizedArrayOf<TrackTableEntry>
trackTable; /* Array[nTracks] of TrackTableEntry records. */

View File

@ -37,7 +37,7 @@ struct FTStringRange
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && tag (base).sanitize (c, length));
return_trace (c->check_struct (this) && (base+tag).sanitize (c, length));
}
protected: