Rename CoverageFormat to Coverage

This commit is contained in:
Behdad Esfahbod 2006-12-26 19:29:08 -05:00
parent 0d6db2abcb
commit 53502c6723
1 changed files with 13 additions and 5 deletions

View File

@ -303,6 +303,10 @@ struct OpenTypeFontFile {
*
*/
/*
* Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList, SubTable
*/
struct Script;
struct ScriptList;
struct LangSys;
@ -312,7 +316,6 @@ struct Lookup;
struct LookupList;
struct SubTable;
typedef struct Record {
Tag tag; /* 4-byte Tag identifier */
Offset offset; /* Offset from beginning of object holding
@ -442,6 +445,10 @@ struct Lookup {
* entries long. */
};
/*
* Coverage
*/
struct CoverageFormat1 {
/* GlyphIDs, in sorted numerical order */
DEFINE_ARRAY_TYPE (GlyphID, glyphArray, glyphCount);
@ -490,19 +497,19 @@ struct CoverageFormat2 {
USHORT coverageFormat; /* Format identifier--format = 2 */
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
* long */
};
struct CoverageFormat {
DEFINE_NON_INSTANTIABLE(CoverageFormat);
struct Coverage {
DEFINE_NON_INSTANTIABLE(Coverage);
inline unsigned int get_size (void) const {
switch (coverageFormat) {
case 1: return ((const CoverageFormat1&)*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 <stdio.h>