LookupFlags
This commit is contained in:
parent
25ad92c8a6
commit
f8ba99f6f3
|
@ -241,7 +241,7 @@ struct TTCHeader {
|
||||||
/* OpenTypeFonts, in no particular order */
|
/* OpenTypeFonts, in no particular order */
|
||||||
DEFINE_OFFSET_ARRAY_TYPE (OffsetTable, offsetTable, numFonts);
|
DEFINE_OFFSET_ARRAY_TYPE (OffsetTable, offsetTable, numFonts);
|
||||||
|
|
||||||
Tag TTCTag; /* TrueType Collection ID string: 'ttcf' */
|
Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */
|
||||||
ULONG version; /* Version of the TTC Header (1.0 or 2.0),
|
ULONG version; /* Version of the TTC Header (1.0 or 2.0),
|
||||||
* 0x00010000 or 0x00020000 */
|
* 0x00010000 or 0x00020000 */
|
||||||
ULONG numFonts; /* Number of fonts in TTC */
|
ULONG numFonts; /* Number of fonts in TTC */
|
||||||
|
@ -306,7 +306,13 @@ typedef struct OpenTypeFontFile {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct Script;
|
struct Script;
|
||||||
|
struct ScriptList;
|
||||||
struct LangSys;
|
struct LangSys;
|
||||||
|
struct Feature;
|
||||||
|
struct FeatureList;
|
||||||
|
struct Lookup;
|
||||||
|
struct LookupList;
|
||||||
|
struct SubTable;
|
||||||
|
|
||||||
|
|
||||||
typedef struct Record {
|
typedef struct Record {
|
||||||
|
@ -315,8 +321,6 @@ typedef struct Record {
|
||||||
* the Record */
|
* the Record */
|
||||||
} ScriptRecord, LangSysRecord, FeatureRecord;
|
} ScriptRecord, LangSysRecord, FeatureRecord;
|
||||||
|
|
||||||
struct Script;
|
|
||||||
|
|
||||||
struct ScriptList {
|
struct ScriptList {
|
||||||
DEFINE_NOT_INSTANTIABLE(ScriptList);
|
DEFINE_NOT_INSTANTIABLE(ScriptList);
|
||||||
/* Scripts, in sorted alphabetical tag order */
|
/* Scripts, in sorted alphabetical tag order */
|
||||||
|
@ -376,8 +380,6 @@ struct LangSys {
|
||||||
* arbitrary order. featureCount entires long */
|
* arbitrary order. featureCount entires long */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Feature;
|
|
||||||
|
|
||||||
struct FeatureList {
|
struct FeatureList {
|
||||||
DEFINE_NOT_INSTANTIABLE(FeatureList);
|
DEFINE_NOT_INSTANTIABLE(FeatureList);
|
||||||
/* Feature indices, in sorted alphabetical tag order */
|
/* Feature indices, in sorted alphabetical tag order */
|
||||||
|
@ -409,6 +411,46 @@ struct Feature {
|
||||||
* entries long */
|
* entries long */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct LookupList {
|
||||||
|
DEFINE_NOT_INSTANTIABLE(LookupList);
|
||||||
|
/* Lookup indices, in sorted alphabetical tag order */
|
||||||
|
DEFINE_OFFSET_ARRAY_TYPE (Lookup, lookupOffset, lookupCount);
|
||||||
|
|
||||||
|
USHORT lookupCount; /* Number of lookups in this table */
|
||||||
|
Offset lookupOffset[]; /* Array of offsets to Lookup tables--from
|
||||||
|
* beginning of LookupList--zero based (first
|
||||||
|
* lookup is Lookup index = 0). lookupCount
|
||||||
|
* entries long */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LookupFlag : USHORT {
|
||||||
|
static const uint16_t RightToLeft = 0x0001u;
|
||||||
|
static const uint16_t IgnoreBaseGlyphs = 0x0002u;
|
||||||
|
static const uint16_t IgnoreLigatures = 0x0004u;
|
||||||
|
static const uint16_t IgnoreMarks = 0x0008u;
|
||||||
|
static const uint16_t Reserved = 0x00F0u;
|
||||||
|
static const uint16_t MarkAttachmentType = 0xFF00u;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Lookup {
|
||||||
|
DEFINE_NOT_INSTANTIABLE(Lookup);
|
||||||
|
/* SubTables, in the desired order */
|
||||||
|
DEFINE_OFFSET_ARRAY_TYPE (SubTable, subTableOffset, subTableCount);
|
||||||
|
|
||||||
|
inline bool is_right_to_left (void) const { return lookupFlag & LookupFlag::RightToLeft; }
|
||||||
|
inline bool ignore_base_glyphs(void) const { return lookupFlag & LookupFlag::IgnoreBaseGlyphs; }
|
||||||
|
inline bool ignore_ligatures (void) const { return lookupFlag & LookupFlag::IgnoreLigatures; }
|
||||||
|
inline bool ignore_marks (void) const { return lookupFlag & LookupFlag::IgnoreMarks; }
|
||||||
|
inline bool get_mark_attachment_type (void) const { return (lookupFlag & LookupFlag::MarkAttachmentType) >> 8; }
|
||||||
|
|
||||||
|
USHORT lookupType; /* Different enumerations for GSUB and GPOS */
|
||||||
|
USHORT lookupFlag; /* Lookup qualifiers */
|
||||||
|
USHORT subTableCount; /* Number of SubTables for this lookup */
|
||||||
|
Offset subTableOffset[];/* Array of offsets to SubTables-from
|
||||||
|
* beginning of Lookup table. subTableCount
|
||||||
|
* entries long. */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue