15
unsigned int numTTC,useTTC;
18
unsigned short numTables;
22
unsigned short unitsPerEm;
23
unsigned short indexToLocFormat; // 0=short, 1=long
24
unsigned short numGlyphs;
26
// optionally loaded data
27
unsigned int *glyphOffsets;
28
unsigned short numberOfHMetrics;
29
char *hmtx,*name,*cmap;
30
const char *unimap; // ptr to (3,1) or (3,0) cmap start
32
// single glyf buffer, allocated large enough by otf_load_more()
34
OTF_DIRENT *glyfTable;
37
#define OTF_F_FMT_CFF 0x10000
38
#define OTF_F_DO_CHECKSUM 0x40000
40
// to load TTC collections: append e.g. "/3" for the third font in the file.
41
OTF_FILE *otf_load(const char *file);
42
void otf_close(OTF_FILE *otf);
44
#define OTF_TAG(a,b,c,d) (unsigned int)( ((a)<<24)|((b)<<16)|((c)<<8)|(d) )
45
#define OTF_UNTAG(a) (((unsigned int)(a)>>24)&0xff),(((unsigned int)(a)>>16)&0xff),\
46
(((unsigned int)(a)>>8)&0xff),(((unsigned int)(a))&0xff)
48
char *otf_get_table(OTF_FILE *otf,unsigned int tag,int *ret_len);
50
int otf_get_width(OTF_FILE *otf,unsigned short gid);
51
const char *otf_get_name(OTF_FILE *otf,int platformID,int encodingID,int languageID,int nameID,int *ret_len);
52
int otf_get_glyph(OTF_FILE *otf,unsigned short gid);
53
unsigned short otf_from_unicode(OTF_FILE *otf,int unicode);
58
// TODO?! allow glyphs==NULL for non-subsetting table reduction?
59
int otf_subset(OTF_FILE *otf,BITSET glyphs,OUTPUT_FN output,void *context);
60
int otf_ttc_extract(OTF_FILE *otf,OUTPUT_FN output,void *context);
61
int otf_subset_cff(OTF_FILE *otf,BITSET glyphs,OUTPUT_FN output,void *context);
62
int otf_cff_extract(OTF_FILE *otf,OUTPUT_FN output,void *context);