2 Parser and writer for truetype font files.
4 Part of the swftools package.
6 Copyright (c) 2010 Matthias Kramm <kramm@quiss.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
27 typedef struct _ttf_table {
29 struct _ttf_table*prev;
30 struct _ttf_table*next;
37 typedef struct _table_maxp {
40 U16 maxComponentPoints;
41 U16 maxComponentContours;
43 U16 maxTwilightPoints;
46 U16 maxInstructionDefs;
48 U16 maxSizeOfInstructions;
49 U16 maxComponentElements;
50 U16 maxComponentDepth;
53 typedef struct _table_os2 {
60 U16 ySubscriptXOffset;
61 U16 ySubscriptYOffset;
62 U16 ySuperscriptXSize;
63 U16 ySuperscriptYSize;
64 U16 ySuperscriptXOffset;
65 U16 ySuperscriptYOffset;
67 U16 yStrikeoutPosition;
74 U8 panose_StrokeVariation;
92 /* for version >= 0x0001 */
96 /* for version >= 0x0002 */
104 typedef struct _table_hea
110 S16 minLeftSideBearing;
111 S16 minRightSideBearing;
118 #define GLYPH_ON_CURVE 0x01
119 #define GLYPH_CONTOUR_START 0x40
120 #define GLYPH_CONTOUR_END 0x80
122 typedef U32 unicode_t;
124 typedef struct _ttfpoint {
128 typedef struct _ttfglyph {
131 S16 xmin,ymin,xmax,ymax;
138 typedef struct _table_head {
141 S16 xmin,ymin,xmax,ymax;
143 U16 lowest_readable_size;
147 typedef struct _ttf {
167 ttf_t*load_ttf(void*data, int length);
168 ttf_table_t*ttf_addtable(ttf_t*ttf, U32 tag);