update dev300-m58
[ooovba.git] / vcl / inc / sft.hxx
blobae82fff01f6571aa43669002a2dd0beebcc24e63
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 /**
29 * @file sft.h
30 * @brief Sun Font Tools
31 * @author Alexander Gelfenbain
35 * If NO_MAPPERS is defined, MapChar() and MapString() and consequently GetTTSimpleCharMetrics()
36 * don't get compiled in. This is done to avoid including a large chunk of code (TranslateXY() from
37 * xlat.c in the projects that don't require it.
39 * If NO_TYPE3 is defined CreateT3FromTTGlyphs() does not get compiled in.
40 * If NO_TYPE42 is defined Type42-related code is excluded
41 * If NO_TTCR is defined TrueType creation related code is excluded\
45 * Generated fonts contain an XUID entry in the form of:
47 * 103 0 T C1 N C2 C3
49 * 103 - Sun's Adobe assigned XUID number. Contact person: Alexander Gelfenbain <gelf@eng.sun.com>
51 * T - font type. 0: Type 3, 1: Type 42
52 * C1 - CRC-32 of the entire source TrueType font
53 * N - number of glyphs in the subset
54 * C2 - CRC-32 of the array of glyph IDs used to generate the subset
55 * C3 - CRC-32 of the array of encoding numbers used to generate the subset
60 #ifndef __SUBFONT_H
61 #define __SUBFONT_H
63 #ifdef UNX
64 #include <sys/types.h>
65 #include <unistd.h>
66 #endif
67 #include <stdio.h>
69 #include <sal/types.h>
71 #include <vector>
73 namespace vcl
76 /*@{*/
77 typedef sal_Int16 F2Dot14; /**< fixed: 2.14 */
78 typedef sal_Int32 F16Dot16; /**< fixed: 16.16 */
79 /*@}*/
81 typedef struct {
82 sal_uInt16 s;
83 sal_uInt16 d;
84 } sal_uInt16pair;
86 /** Return value of OpenTTFont() and CreateT3FromTTGlyphs() */
87 enum SFErrCodes {
88 SF_OK, /**< no error */
89 SF_BADFILE, /**< file not found */
90 SF_FILEIO, /**< file I/O error */
91 SF_MEMORY, /**< memory allocation error */
92 SF_GLYPHNUM, /**< incorrect number of glyphs */
93 SF_BADARG, /**< incorrect arguments */
94 SF_TTFORMAT, /**< incorrect TrueType font format */
95 SF_TABLEFORMAT, /**< incorrect format of a TrueType table */
96 SF_FONTNO /**< incorrect logical font number of a TTC font */
99 #ifndef FW_THIN /* WIN32 compilation would conflict */
100 /** Value of the weight member of the TTGlobalFontInfo struct */
101 enum WeightClass {
102 FW_THIN = 100, /**< Thin */
103 FW_EXTRALIGHT = 200, /**< Extra-light (Ultra-light) */
104 FW_LIGHT = 300, /**< Light */
105 FW_NORMAL = 400, /**< Normal (Regular) */
106 FW_MEDIUM = 500, /**< Medium */
107 FW_SEMIBOLD = 600, /**< Semi-bold (Demi-bold) */
108 FW_BOLD = 700, /**< Bold */
109 FW_EXTRABOLD = 800, /**< Extra-bold (Ultra-bold) */
110 FW_BLACK = 900 /**< Black (Heavy) */
113 /** Value of the width member of the TTGlobalFontInfo struct */
114 #ifndef OS2
115 enum WidthClass {
116 FWIDTH_ULTRA_CONDENSED = 1, /**< 50% of normal */
117 FWIDTH_EXTRA_CONDENSED = 2, /**< 62.5% of normal */
118 FWIDTH_CONDENSED = 3, /**< 75% of normal */
119 FWIDTH_SEMI_CONDENSED = 4, /**< 87.5% of normal */
120 FWIDTH_NORMAL = 5, /**< Medium, 100% */
121 FWIDTH_SEMI_EXPANDED = 6, /**< 112.5% of normal */
122 FWIDTH_EXPANDED = 7, /**< 125% of normal */
123 FWIDTH_EXTRA_EXPANDED = 8, /**< 150% of normal */
124 FWIDTH_ULTRA_EXPANDED = 9 /**< 200% of normal */
126 #endif // OS2
127 #endif /* FW_THIN */
129 /** Type of the 'kern' table, stored in _TrueTypeFont::kerntype */
130 enum KernType {
131 KT_NONE = 0, /**< no kern table */
132 KT_APPLE_NEW = 1, /**< new Apple kern table */
133 KT_MICROSOFT = 2 /**< Microsoft table */
136 /* Composite glyph flags definition */
137 enum CompositeFlags {
138 ARG_1_AND_2_ARE_WORDS = 1,
139 ARGS_ARE_XY_VALUES = 1<<1,
140 ROUND_XY_TO_GRID = 1<<2,
141 WE_HAVE_A_SCALE = 1<<3,
142 MORE_COMPONENTS = 1<<5,
143 WE_HAVE_AN_X_AND_Y_SCALE = 1<<6,
144 WE_HAVE_A_TWO_BY_TWO = 1<<7,
145 WE_HAVE_INSTRUCTIONS = 1<<8,
146 USE_MY_METRICS = 1<<9,
147 OVERLAP_COMPOUND = 1<<10
150 #ifndef NO_TTCR
151 /** Flags for TrueType generation */
152 enum TTCreationFlags {
153 TTCF_AutoName = 1, /**< Automatically generate a compact 'name' table.
154 If this flag is not set, name table is generated
155 either from an array of NameRecord structs passed as
156 arguments or if the array is NULL, 'name' table
157 of the generated TrueType file will be a copy
158 of the name table of the original file.
159 If this flag is set the array of NameRecord structs
160 is ignored and a very compact 'name' table is automatically
161 generated. */
163 TTCF_IncludeOS2 = 2 /** If this flag is set OS/2 table from the original font will be
164 copied to the subset */
166 #endif
171 /** Structure used by GetTTSimpleGlyphMetrics() and GetTTSimpleCharMetrics() functions */
172 typedef struct {
173 sal_uInt16 adv; /**< advance width or height */
174 sal_Int16 sb; /**< left or top sidebearing */
175 } TTSimpleGlyphMetrics;
179 /** Structure used by the TrueType Creator and GetRawGlyphData() */
181 typedef struct {
182 sal_uInt32 glyphID; /**< glyph ID */
183 sal_uInt16 nbytes; /**< number of bytes in glyph data */
184 sal_uInt8 *ptr; /**< pointer to glyph data */
185 sal_uInt16 aw; /**< advance width */
186 sal_Int16 lsb; /**< left sidebearing */
187 sal_uInt16 compflag; /**< 0- if non-composite, 1- otherwise */
188 sal_uInt16 npoints; /**< number of points */
189 sal_uInt16 ncontours; /**< number of contours */
190 /* */
191 sal_uInt32 newID; /**< used internally by the TTCR */
192 } GlyphData;
194 /** Structure used by the TrueType Creator and CreateTTFromTTGlyphs() */
195 typedef struct {
196 sal_uInt16 platformID; /**< Platform ID */
197 sal_uInt16 encodingID; /**< Platform-specific encoding ID */
198 sal_uInt16 languageID; /**< Language ID */
199 sal_uInt16 nameID; /**< Name ID */
200 sal_uInt16 slen; /**< String length in bytes */
201 sal_uInt8 *sptr; /**< Pointer to string data (not zero-terminated!) */
202 } NameRecord;
206 /** Return value of GetTTGlobalFontInfo() */
208 typedef struct {
209 char *family; /**< family name */
210 sal_uInt16 *ufamily; /**< family name UCS2 */
211 char *subfamily; /**< subfamily name */
212 sal_uInt16 *usubfamily; /**< subfamily name UCS2 */
213 char *psname; /**< PostScript name */
214 sal_uInt16 macStyle; /**< macstyle bits from 'HEAD' table */
215 int weight; /**< value of WeightClass or 0 if can't be determined */
216 int width; /**< value of WidthClass or 0 if can't be determined */
217 int pitch; /**< 0: proportianal font, otherwise: monospaced */
218 int italicAngle; /**< in counter-clockwise degrees * 65536 */
219 int xMin; /**< global bounding box: xMin */
220 int yMin; /**< global bounding box: yMin */
221 int xMax; /**< global bounding box: xMax */
222 int yMax; /**< global bounding box: yMax */
223 int ascender; /**< typographic ascent. */
224 int descender; /**< typographic descent. */
225 int linegap; /**< typographic line gap.\ Negative values are treated as
226 zero in Win 3.1, System 6 and System 7. */
227 int vascent; /**< typographic ascent for vertical writing mode */
228 int vdescent; /**< typographic descent for vertical writing mode */
229 int typoAscender; /**< OS/2 portable typographic ascender */
230 int typoDescender; /**< OS/2 portable typographic descender */
231 int typoLineGap; /**< OS/2 portable typographc line gap */
232 int winAscent; /**< ascender metric for Windows */
233 int winDescent; /**< descender metric for Windows */
234 int symbolEncoded; /**< 1: MS symbol encoded 0: not symbol encoded */
235 int rangeFlag; /**< if set to 1 Unicode Range flags are applicable */
236 sal_uInt32 ur1; /**< bits 0 - 31 of Unicode Range flags */
237 sal_uInt32 ur2; /**< bits 32 - 63 of Unicode Range flags */
238 sal_uInt32 ur3; /**< bits 64 - 95 of Unicode Range flags */
239 sal_uInt32 ur4; /**< bits 96 - 127 of Unicode Range flags */
240 sal_uInt8 panose[10]; /**< PANOSE classification number */
241 sal_uInt32 typeFlags; /**< type flags (copyright bits + PS-OpenType flag) */
242 } TTGlobalFontInfo;
244 #define TYPEFLAG_INVALID 0x8000000
245 #define TYPEFLAG_COPYRIGHT_MASK 0x000000E
246 #define TYPEFLAG_PS_OPENTYPE 0x0010000
248 /** Structure used by KernGlyphs() */
249 typedef struct {
250 int x; /**< positive: right, negative: left */
251 int y; /**< positive: up, negative: down */
252 } KernData;
255 /** ControlPoint structure used by GetTTGlyphPoints() */
256 typedef struct {
257 sal_uInt32 flags; /**< 00000000 00000000 e0000000 bbbbbbbb */
258 /**< b - byte flags from the glyf array */
259 /**< e == 0 - regular point */
260 /**< e == 1 - end contour */
261 sal_Int16 x; /**< X coordinate in EmSquare units */
262 sal_Int16 y; /**< Y coordinate in EmSquare units */
263 } ControlPoint;
265 typedef struct _TrueTypeFont TrueTypeFont;
268 * @defgroup sft Sun Font Tools Exported Functions
273 * Get the number of fonts contained in a TrueType collection
274 * @param fname - file name
275 * @return number of fonts or zero, if file is not a TTC file.
276 * @ingroup sft
278 int CountTTCFonts(const char* fname);
282 * TrueTypeFont constructor.
283 * The font file has to be provided as a memory buffer and length
284 * @param facenum - logical font number within a TTC file. This value is ignored
285 * for TrueType fonts
286 * @return value of SFErrCodes enum
287 * @ingroup sft
289 int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf); /*FOLD01*/
290 #if !defined(WIN32) && !defined(OS2)
292 * TrueTypeFont constructor.
293 * Reads the font file and allocates the memory for the structure.
294 * on WIN32 the font has to be provided as a memory buffer and length
295 * @param facenum - logical font number within a TTC file. This value is ignored
296 * for TrueType fonts
297 * @return value of SFErrCodes enum
298 * @ingroup sft
300 int OpenTTFontFile(const char *fname, sal_uInt32 facenum, TrueTypeFont** ttf);
301 #endif
304 * TrueTypeFont destructor. Deallocates the memory.
305 * @ingroup sft
307 void CloseTTFont(TrueTypeFont *);
310 * Extracts TrueType control points, and stores them in an allocated array pointed to
311 * by *pointArray. This function returns the number of extracted points.
313 * @param ttf pointer to the TrueTypeFont structure
314 * @param glyphID Glyph ID
315 * @param pointArray Return value - address of the pointer to the first element of the array
316 * of points allocated by the function
317 * @return Returns the number of points in *pointArray or -1 if glyphID is
318 * invalid.
319 * @ingroup sft
322 int GetTTGlyphPoints(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray);
325 * Extracts raw glyph data from the 'glyf' table and returns it in an allocated
326 * GlyphData structure.
328 * @param ttf pointer to the TrueTypeFont structure
329 * @param glyphID Glyph ID
331 * @return pointer to an allocated GlyphData structure or NULL if
332 * glyphID is not present in the font
333 * @ingroup sft
336 GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID);
339 * For a specified glyph adds all component glyphs IDs to the list and
340 * return their number. If the glyph is a single glyph it has one component
341 * glyph (which is added to the list) and the function returns 1.
342 * For a composite glyphs it returns the number of component glyphs
343 * and adds all of them to the list.
345 * @param ttf pointer to the TrueTypeFont structure
346 * @param glyphID Glyph ID
347 * @param glyphlist list of glyphs
349 * @return number of component glyphs
350 * @ingroup sft
353 int GetTTGlyphComponents(TrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal_uInt32 >& glyphlist);
356 * Extracts all Name Records from the font and stores them in an allocated
357 * array of NameRecord structs
359 * @param ttf pointer to the TrueTypeFont struct
360 * @param nr pointer to the array of NameRecord structs
362 * @return number of NameRecord structs
363 * @ingroup sft
366 int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr);
369 * Deallocates previously allocated array of NameRecords.
371 * @param nr array of NameRecord structs
372 * @param n number of elements in the array
374 * @ingroup sft
376 void DisposeNameRecords(NameRecord* nr, int n);
379 #ifndef NO_TYPE3
381 * Generates a new PostScript Type 3 font and dumps it to <b>outf</b> file.
382 * This functions subsititues glyph 0 for all glyphIDs that are not found in the font.
383 * @param ttf pointer to the TrueTypeFont structure
384 * @param outf the resulting font is written to this stream
385 * @param fname font name for the new font. If it is NULL the PostScript name of the
386 * original font will be used
387 * @param glyphArray pointer to an array of glyphs that are to be extracted from ttf
388 * @param encoding array of encoding values. encoding[i] specifies the position of the glyph
389 * glyphArray[i] in the encoding vector of the resulting Type3 font
390 * @param nGlyphs number of glyph IDs in glyphArray and encoding values in encoding
391 * @param wmode writing mode for the output file: 0 - horizontal, 1 - vertical
392 * @return return the value of SFErrCodes enum
393 * @see SFErrCodes
394 * @ingroup sft
397 int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode);
398 #endif
400 #ifndef NO_TTCR
402 * Generates a new TrueType font and dumps it to <b>outf</b> file.
403 * This functions subsititues glyph 0 for all glyphIDs that are not found in the font.
404 * @param ttf pointer to the TrueTypeFont structure
405 * @param fname file name for the output TrueType font file
406 * @param glyphArray pointer to an array of glyphs that are to be extracted from ttf. The first
407 * element of this array has to be glyph 0 (default glyph)
408 * @param encoding array of encoding values. encoding[i] specifies character code for
409 * the glyphID glyphArray[i]. Character code 0 usually points to a default
410 * glyph (glyphID 0)
411 * @param nGlyphs number of glyph IDs in glyphArray and encoding values in encoding
412 * @param nNameRecs number of NameRecords for the font, if 0 the name table from the
413 * original font will be used
414 * @param nr array of NameRecords
415 * @param flags or'ed TTCreationFlags
416 * @return return the value of SFErrCodes enum
417 * @see SFErrCodes
418 * @ingroup sft
421 int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
422 const char *fname,
423 sal_uInt16 *glyphArray,
424 sal_uInt8 *encoding,
425 int nGlyphs,
426 int nNameRecs,
427 NameRecord *nr,
428 sal_uInt32 flags);
429 #endif
431 #ifndef NO_TYPE42
433 * Generates a new PostScript Type42 font and dumps it to <b>outf</b> file.
434 * This functions subsititues glyph 0 for all glyphIDs that are not found in the font.
435 * @param ttf pointer to the TrueTypeFont structure
436 * @param outf output stream for a resulting font
437 * @param psname PostScript name of the resulting font
438 * @param glyphArray pointer to an array of glyphs that are to be extracted from ttf. The first
439 * element of this array has to be glyph 0 (default glyph)
440 * @param encoding array of encoding values. encoding[i] specifies character code for
441 * the glyphID glyphArray[i]. Character code 0 usually points to a default
442 * glyph (glyphID 0)
443 * @param nGlyphs number of glyph IDs in glyphArray and encoding values in encoding
444 * @return SF_OK - no errors
445 * SF_GLYPHNUM - too many glyphs (> 255)
446 * SF_TTFORMAT - corrupted TrueType fonts
448 * @see SFErrCodes
449 * @ingroup sft
452 int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
453 FILE *outf,
454 const char *psname,
455 sal_uInt16 *glyphArray,
456 sal_uInt8 *encoding,
457 int nGlyphs);
458 #endif
462 * Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
464 * @param ttf pointer to the TrueTypeFont structure
465 * @param glyphArray pointer to an array of glyphs that are to be extracted from ttf
466 * @param nGlyphs number of glyph IDs in glyphArray and encoding values in encoding
467 * @param mode writing mode: 0 - horizontal, 1 - vertical
468 * @ingroup sft
471 TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, int mode);
473 #ifndef NO_MAPPERS
475 * Queries glyph metrics. Allocates an array of TTSimpleGlyphMetrics structs and returns it.
476 * This function behaves just like GetTTSimpleGlyphMetrics() but it takes a range of Unicode
477 * characters instead of an array of glyphs.
479 * @param ttf pointer to the TrueTypeFont structure
480 * @param firstChar Unicode value of the first character in the range
481 * @param nChars number of Unicode characters in the range
482 * @param mode writing mode: 0 - horizontal, 1 - vertical
484 * @see GetTTSimpleGlyphMetrics
485 * @ingroup sft
488 TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont *ttf, sal_uInt16 firstChar, int nChars, int mode);
491 * Maps a Unicode (UCS-2) string to a glyph array. Returns the number of glyphs in the array,
492 * which for TrueType fonts is always the same as the number of input characters.
494 * @param ttf pointer to the TrueTypeFont structure
495 * @param str pointer to a UCS-2 string
496 * @param nchars number of characters in <b>str</b>
497 * @param glyphArray pointer to the glyph array where glyph IDs are to be recorded.
499 * @return MapString() returns -1 if the TrueType font has no usable 'cmap' tables.
500 * Otherwise it returns the number of characters processed: <b>nChars</b>
502 * glyphIDs of TrueType fonts are 2 byte positive numbers. glyphID of 0 denotes a missing
503 * glyph and traditionally defaults to an empty square.
504 * glyphArray should be at least sizeof(sal_uInt16) * nchars bytes long. If glyphArray is NULL
505 * MapString() replaces the UCS-2 characters in str with glyphIDs.
506 * @ingroup sft
508 int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, int bvertical);
511 * Maps a Unicode (UCS-2) character to a glyph ID and returns it. Missing glyph has
512 * a glyphID of 0 so this function can be used to test if a character is encoded in the font.
514 * @param ttf pointer to the TrueTypeFont structure
515 * @param ch Unicode (UCS-2) character
516 * @return glyph ID, if the character is missing in the font, the return value is 0.
517 * @ingroup sft
519 sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical);
522 * Returns 0 when the font does not substitute vertical glyphs
524 * @param ttf pointer to the TrueTypeFont structure
526 int DoesVerticalSubstitution( TrueTypeFont *ttf, int bvertical);
528 #endif
531 * Returns global font information about the TrueType font.
532 * @see TTGlobalFontInfo
534 * @param ttf pointer to a TrueTypeFont structure
535 * @param info pointer to a TTGlobalFontInfo structure
536 * @ingroup sft
539 void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info);
541 #ifdef TEST5
543 * Returns kerning information for an array of glyphs.
544 * Kerning is not cumulative.
545 * kern[i] contains kerning information for a pair of glyphs at positions i and i+1
547 * @param ttf pointer to a TrueTypeFont structure
548 * @param glyphs array of source glyphs
549 * @param nglyphs number of glyphs in the array
550 * @param wmode writing mode: 0 - horizontal, 1 - vertical
551 * @param kern array of KernData structures. It should contain nglyphs-1 elements
552 * @see KernData
553 * @ingroup sft
556 void KernGlyphs(TrueTypeFont *ttf, sal_uInt16 *glyphs, int nglyphs, int wmode, KernData *kern);
557 #endif
560 * Returns nonzero if font is a symbol encoded font
562 int CheckSymbolEncoding(TrueTypeFont* ttf);
565 * returns the number of glyphs in a font
567 int GetTTGlyphCount( TrueTypeFont* ttf );
570 * provide access to the raw data of a SFNT-container's subtable
572 bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
573 const sal_uInt8** ppRawBytes, int* pRawLength );
575 /*- private definitions */ /*FOLD00*/
577 struct _TrueTypeFont {
578 sal_uInt32 tag;
580 char *fname;
581 sal_Int32 fsize;
582 sal_uInt8 *ptr;
584 char *psname;
585 char *family;
586 sal_uInt16 *ufamily;
587 char *subfamily;
588 sal_uInt16 *usubfamily;
590 sal_uInt32 ntables;
591 sal_uInt32 *goffsets;
592 sal_uInt32 nglyphs;
593 sal_uInt32 unitsPerEm;
594 sal_uInt32 numberOfHMetrics;
595 sal_uInt32 numOfLongVerMetrics; /* if this number is not 0, font has vertical metrics information */
596 const sal_uInt8* cmap;
597 int cmapType;
598 sal_uInt32 (*mapper)(const sal_uInt8 *, sal_uInt32); /* character to glyphID translation function */
599 const sal_uInt8 **tables; /* array of pointers to raw subtables in SFNT file */
600 sal_uInt32 *tlens; /* array of table lengths */
601 int kerntype; /* Defined in the KernType enum */
602 sal_uInt32 nkern; /* number of kern subtables */
603 const sal_uInt8** kerntables; /* array of pointers to kern subtables */
604 void *pGSubstitution; /* info provided by GSUB for UseGSUB() */
607 /* indexes into _TrueTypeFont::tables[] and _TrueTypeFont::tlens[] */
608 #define O_maxp 0 /* 'maxp' */
609 #define O_glyf 1 /* 'glyf' */
610 #define O_head 2 /* 'head' */
611 #define O_loca 3 /* 'loca' */
612 #define O_name 4 /* 'name' */
613 #define O_hhea 5 /* 'hhea' */
614 #define O_hmtx 6 /* 'hmtx' */
615 #define O_cmap 7 /* 'cmap' */
616 #define O_vhea 8 /* 'vhea' */
617 #define O_vmtx 9 /* 'vmtx' */
618 #define O_OS2 10 /* 'OS/2' */
619 #define O_post 11 /* 'post' */
620 #define O_kern 12 /* 'kern' */
621 #define O_cvt 13 /* 'cvt_' - only used in TT->TT generation */
622 #define O_prep 14 /* 'prep' - only used in TT->TT generation */
623 #define O_fpgm 15 /* 'fpgm' - only used in TT->TT generation */
624 #define O_gsub 16 /* 'GSUB' */
625 #define O_CFF 17 /* 'CFF' */
626 #define NUM_TAGS 18
628 } // namespace vcl
630 #endif /* __SUBFONT_H */