Rename CoverageFormat to Coverage
This commit is contained in:
parent
0d6db2abcb
commit
53502c6723
|
@ -303,6 +303,10 @@ struct OpenTypeFontFile {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList, SubTable
|
||||||
|
*/
|
||||||
|
|
||||||
struct Script;
|
struct Script;
|
||||||
struct ScriptList;
|
struct ScriptList;
|
||||||
struct LangSys;
|
struct LangSys;
|
||||||
|
@ -312,7 +316,6 @@ struct Lookup;
|
||||||
struct LookupList;
|
struct LookupList;
|
||||||
struct SubTable;
|
struct SubTable;
|
||||||
|
|
||||||
|
|
||||||
typedef struct Record {
|
typedef struct Record {
|
||||||
Tag tag; /* 4-byte Tag identifier */
|
Tag tag; /* 4-byte Tag identifier */
|
||||||
Offset offset; /* Offset from beginning of object holding
|
Offset offset; /* Offset from beginning of object holding
|
||||||
|
@ -442,6 +445,10 @@ struct Lookup {
|
||||||
* entries long. */
|
* entries long. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Coverage
|
||||||
|
*/
|
||||||
|
|
||||||
struct CoverageFormat1 {
|
struct CoverageFormat1 {
|
||||||
/* GlyphIDs, in sorted numerical order */
|
/* GlyphIDs, in sorted numerical order */
|
||||||
DEFINE_ARRAY_TYPE (GlyphID, glyphArray, glyphCount);
|
DEFINE_ARRAY_TYPE (GlyphID, glyphArray, glyphCount);
|
||||||
|
@ -490,19 +497,19 @@ struct CoverageFormat2 {
|
||||||
|
|
||||||
USHORT coverageFormat; /* Format identifier--format = 2 */
|
USHORT coverageFormat; /* Format identifier--format = 2 */
|
||||||
USHORT rangeCount; /* Number of CoverRangeRecords */
|
USHORT rangeCount; /* Number of CoverRangeRecords */
|
||||||
CoverRangeRecord rangeRecord[]; /* Array of glyph ranges--ordered by
|
CoverageRangeRecord rangeRecord[]; /* Array of glyph ranges--ordered by
|
||||||
* Start GlyphID. rangeCount entries
|
* Start GlyphID. rangeCount entries
|
||||||
* long */
|
* long */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CoverageFormat {
|
struct Coverage {
|
||||||
DEFINE_NON_INSTANTIABLE(CoverageFormat);
|
DEFINE_NON_INSTANTIABLE(Coverage);
|
||||||
|
|
||||||
inline unsigned int get_size (void) const {
|
inline unsigned int get_size (void) const {
|
||||||
switch (coverageFormat) {
|
switch (coverageFormat) {
|
||||||
case 1: return ((const CoverageFormat1&)*this).get_size ();
|
case 1: return ((const CoverageFormat1&)*this).get_size ();
|
||||||
case 2: return ((const CoverageFormat2&)*this).get_size ();
|
case 2: return ((const CoverageFormat2&)*this).get_size ();
|
||||||
default: return sizeof (coverageFormat);
|
default: return sizeof (Coverage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,6 +530,7 @@ struct CoverageFormat {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue