136 * Offset ::
137 * The offset of the table from the start of the TrueType font in its
138 * resource.
139 *
140 * Length ::
141 * The table length (in bytes).
142 */
143 typedef struct TT_TableRec_
144 {
145 FT_ULong Tag; /* table type */
146 FT_ULong CheckSum; /* table checksum */
147 FT_ULong Offset; /* table file offset */
148 FT_ULong Length; /* table length */
149
150 } TT_TableRec, *TT_Table;
151
152
153 /**************************************************************************
154 *
155 * @struct:
156 * WOFF_HeaderRec
157 *
158 * @description:
159 * WOFF file format header.
160 *
161 * @fields:
162 * See
163 *
164 * https://www.w3.org/TR/WOFF/#WOFFHeader
165 */
166 typedef struct WOFF_HeaderRec_
167 {
168 FT_ULong signature;
169 FT_ULong flavor;
170 FT_ULong length;
171 FT_UShort num_tables;
172 FT_UShort reserved;
173 FT_ULong totalSfntSize;
174 FT_UShort majorVersion;
175 FT_UShort minorVersion;
176 FT_ULong metaOffset;
177 FT_ULong metaLength;
178 FT_ULong metaOrigLength;
179 FT_ULong privOffset;
180 FT_ULong privLength;
181
182 } WOFF_HeaderRec, *WOFF_Header;
183
184
185 /**************************************************************************
186 *
187 * @struct:
188 * WOFF_TableRec
189 *
190 * @description:
191 * This structure describes a given table of a WOFF font.
192 *
193 * @fields:
194 * Tag ::
195 * A four-bytes tag describing the table.
196 *
197 * Offset ::
198 * The offset of the table from the start of the WOFF font in its
199 * resource.
200 *
201 * CompLength ::
202 * Compressed table length (in bytes).
203 *
204 * OrigLength ::
205 * Uncompressed table length (in bytes).
206 *
207 * CheckSum ::
208 * The table checksum. This value can be ignored.
209 *
210 * OrigOffset ::
211 * The uncompressed table file offset. This value gets computed while
212 * constructing the (uncompressed) SFNT header. It is not contained in
213 * the WOFF file.
214 */
215 typedef struct WOFF_TableRec_
216 {
217 FT_ULong Tag; /* table ID */
218 FT_ULong Offset; /* table file offset */
219 FT_ULong CompLength; /* compressed table length */
220 FT_ULong OrigLength; /* uncompressed table length */
221 FT_ULong CheckSum; /* uncompressed checksum */
222
223 FT_ULong OrigOffset; /* uncompressed table file offset */
224 /* (not in the WOFF file) */
225 } WOFF_TableRec, *WOFF_Table;
226
227
228 /**************************************************************************
229 *
230 * @struct:
231 * TT_LongMetricsRec
232 *
233 * @description:
234 * A structure modeling the long metrics of the 'hmtx' and 'vmtx'
235 * TrueType tables. The values are expressed in font units.
236 *
237 * @fields:
238 * advance ::
239 * The advance width or height for the glyph.
240 *
241 * bearing ::
242 * The left-side or top-side bearing for the glyph.
243 */
244 typedef struct TT_LongMetricsRec_
245 {
246 FT_UShort advance;
247 FT_Short bearing;
248
249 } TT_LongMetricsRec, *TT_LongMetrics;
250
1378 * font_program ::
1379 * The face's font program (bytecode stream) executed at load time,
1380 * also used during glyph rendering. Comes from the 'fpgm' table.
1381 * Ignored for Type 2 font fonts.
1382 *
1383 * cvt_program_size ::
1384 * The size in bytecodes of the face's cvt program. Ignored for Type 2
1385 * fonts.
1386 *
1387 * cvt_program ::
1388 * The face's cvt program (bytecode stream) executed each time an
1389 * instance/size is changed/reset. Comes from the 'prep' table.
1390 * Ignored for Type 2 fonts.
1391 *
1392 * cvt_size ::
1393 * Size of the control value table (in entries). Ignored for Type 2
1394 * fonts.
1395 *
1396 * cvt ::
1397 * The face's original control value table. Coordinates are expressed
1398 * in unscaled font units. Comes from the 'cvt~' table. Ignored for
1399 * Type 2 fonts.
1400 *
1401 * interpreter ::
1402 * A pointer to the TrueType bytecode interpreters field is also used
1403 * to hook the debugger in 'ttdebug'.
1404 *
1405 * extra ::
1406 * Reserved for third-party font drivers.
1407 *
1408 * postscript_name ::
1409 * The PS name of the font. Used by the postscript name service.
1410 *
1411 * glyf_len ::
1412 * The length of the 'glyf' table. Needed for malformed 'loca' tables.
1413 *
1414 * glyf_offset ::
1415 * The file offset of the 'glyf' table.
1416 *
1417 * is_cff2 ::
1418 * Set if the font format is CFF2.
1419 *
1616 FT_Bool have_foreground_color;
1617 FT_Color foreground_color;
1618
1619
1620 /************************************************************************
1621 *
1622 * TrueType-specific fields (ignored by the CFF driver)
1623 *
1624 */
1625
1626 /* the font program, if any */
1627 FT_ULong font_program_size;
1628 FT_Byte* font_program;
1629
1630 /* the cvt program, if any */
1631 FT_ULong cvt_program_size;
1632 FT_Byte* cvt_program;
1633
1634 /* the original, unscaled, control value table */
1635 FT_ULong cvt_size;
1636 FT_Short* cvt;
1637
1638 /* A pointer to the bytecode interpreter to use. This is also */
1639 /* used to hook the debugger for the `ttdebug' utility. */
1640 TT_Interpreter interpreter;
1641
1642
1643 /************************************************************************
1644 *
1645 * Other tables or fields. This is used by derivative formats like
1646 * OpenType.
1647 *
1648 */
1649
1650 FT_Generic extra;
1651
1652 const char* postscript_name;
1653
1654 FT_ULong glyf_len;
1655 FT_ULong glyf_offset; /* since 2.7.1 */
1656
|
136 * Offset ::
137 * The offset of the table from the start of the TrueType font in its
138 * resource.
139 *
140 * Length ::
141 * The table length (in bytes).
142 */
143 typedef struct TT_TableRec_
144 {
145 FT_ULong Tag; /* table type */
146 FT_ULong CheckSum; /* table checksum */
147 FT_ULong Offset; /* table file offset */
148 FT_ULong Length; /* table length */
149
150 } TT_TableRec, *TT_Table;
151
152
153 /**************************************************************************
154 *
155 * @struct:
156 * TT_LongMetricsRec
157 *
158 * @description:
159 * A structure modeling the long metrics of the 'hmtx' and 'vmtx'
160 * TrueType tables. The values are expressed in font units.
161 *
162 * @fields:
163 * advance ::
164 * The advance width or height for the glyph.
165 *
166 * bearing ::
167 * The left-side or top-side bearing for the glyph.
168 */
169 typedef struct TT_LongMetricsRec_
170 {
171 FT_UShort advance;
172 FT_Short bearing;
173
174 } TT_LongMetricsRec, *TT_LongMetrics;
175
1303 * font_program ::
1304 * The face's font program (bytecode stream) executed at load time,
1305 * also used during glyph rendering. Comes from the 'fpgm' table.
1306 * Ignored for Type 2 font fonts.
1307 *
1308 * cvt_program_size ::
1309 * The size in bytecodes of the face's cvt program. Ignored for Type 2
1310 * fonts.
1311 *
1312 * cvt_program ::
1313 * The face's cvt program (bytecode stream) executed each time an
1314 * instance/size is changed/reset. Comes from the 'prep' table.
1315 * Ignored for Type 2 fonts.
1316 *
1317 * cvt_size ::
1318 * Size of the control value table (in entries). Ignored for Type 2
1319 * fonts.
1320 *
1321 * cvt ::
1322 * The face's original control value table. Coordinates are expressed
1323 * in unscaled font units (in 26.6 format). Comes from the 'cvt~'
1324 * table. Ignored for Type 2 fonts.
1325 *
1326 * If varied by the `CVAR' table, non-integer values are possible.
1327 *
1328 * interpreter ::
1329 * A pointer to the TrueType bytecode interpreters field is also used
1330 * to hook the debugger in 'ttdebug'.
1331 *
1332 * extra ::
1333 * Reserved for third-party font drivers.
1334 *
1335 * postscript_name ::
1336 * The PS name of the font. Used by the postscript name service.
1337 *
1338 * glyf_len ::
1339 * The length of the 'glyf' table. Needed for malformed 'loca' tables.
1340 *
1341 * glyf_offset ::
1342 * The file offset of the 'glyf' table.
1343 *
1344 * is_cff2 ::
1345 * Set if the font format is CFF2.
1346 *
1543 FT_Bool have_foreground_color;
1544 FT_Color foreground_color;
1545
1546
1547 /************************************************************************
1548 *
1549 * TrueType-specific fields (ignored by the CFF driver)
1550 *
1551 */
1552
1553 /* the font program, if any */
1554 FT_ULong font_program_size;
1555 FT_Byte* font_program;
1556
1557 /* the cvt program, if any */
1558 FT_ULong cvt_program_size;
1559 FT_Byte* cvt_program;
1560
1561 /* the original, unscaled, control value table */
1562 FT_ULong cvt_size;
1563 FT_Int32* cvt;
1564
1565 /* A pointer to the bytecode interpreter to use. This is also */
1566 /* used to hook the debugger for the `ttdebug' utility. */
1567 TT_Interpreter interpreter;
1568
1569
1570 /************************************************************************
1571 *
1572 * Other tables or fields. This is used by derivative formats like
1573 * OpenType.
1574 *
1575 */
1576
1577 FT_Generic extra;
1578
1579 const char* postscript_name;
1580
1581 FT_ULong glyf_len;
1582 FT_ULong glyf_offset; /* since 2.7.1 */
1583
|