David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 1 | /***************************************************************************/ |
| 2 | /* */ |
| 3 | /* ttobjs.h */ |
| 4 | /* */ |
| 5 | /* Objects manager (specification). */ |
| 6 | /* */ |
Werner Lemberg | 18931a5 | 2011-02-01 07:08:43 +0100 | [diff] [blame] | 7 | /* Copyright 1996-2009, 2011 by */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 | /* */ |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 10 | /* This file is part of the FreeType project, and may only be used, */ |
| 11 | /* modified, and distributed under the terms of the FreeType project */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 | /* this file you indicate that you have read the license and */ |
| 14 | /* understand and accept it fully. */ |
| 15 | /* */ |
| 16 | /***************************************************************************/ |
| 17 | |
| 18 | |
Werner Lemberg | 90d9964 | 2000-12-09 00:45:38 +0000 | [diff] [blame] | 19 | #ifndef __TTOBJS_H__ |
| 20 | #define __TTOBJS_H__ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 21 | |
Werner Lemberg | cc069be | 2000-12-08 16:17:16 +0000 | [diff] [blame] | 22 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 23 | #include <ft2build.h> |
| 24 | #include FT_INTERNAL_OBJECTS_H |
| 25 | #include FT_INTERNAL_TRUETYPE_TYPES_H |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 26 | |
Werner Lemberg | cc069be | 2000-12-08 16:17:16 +0000 | [diff] [blame] | 27 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 28 | FT_BEGIN_HEADER |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 29 | |
| 30 | |
| 31 | /*************************************************************************/ |
| 32 | /* */ |
| 33 | /* <Type> */ |
| 34 | /* TT_Driver */ |
| 35 | /* */ |
| 36 | /* <Description> */ |
| 37 | /* A handle to a TrueType driver object. */ |
| 38 | /* */ |
| 39 | typedef struct TT_DriverRec_* TT_Driver; |
| 40 | |
| 41 | |
| 42 | /*************************************************************************/ |
| 43 | /* */ |
| 44 | /* <Type> */ |
| 45 | /* TT_Instance */ |
| 46 | /* */ |
| 47 | /* <Description> */ |
| 48 | /* A handle to a TrueType size object. */ |
| 49 | /* */ |
| 50 | typedef struct TT_SizeRec_* TT_Size; |
| 51 | |
| 52 | |
| 53 | /*************************************************************************/ |
| 54 | /* */ |
| 55 | /* <Type> */ |
| 56 | /* TT_GlyphSlot */ |
| 57 | /* */ |
| 58 | /* <Description> */ |
| 59 | /* A handle to a TrueType glyph slot object. */ |
| 60 | /* */ |
| 61 | /* <Note> */ |
| 62 | /* This is a direct typedef of FT_GlyphSlot, as there is nothing */ |
| 63 | /* specific about the TrueType glyph slot. */ |
| 64 | /* */ |
| 65 | typedef FT_GlyphSlot TT_GlyphSlot; |
| 66 | |
| 67 | |
| 68 | /*************************************************************************/ |
| 69 | /* */ |
| 70 | /* <Struct> */ |
| 71 | /* TT_GraphicsState */ |
| 72 | /* */ |
| 73 | /* <Description> */ |
| 74 | /* The TrueType graphics state used during bytecode interpretation. */ |
| 75 | /* */ |
| 76 | typedef struct TT_GraphicsState_ |
| 77 | { |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 78 | FT_UShort rp0; |
| 79 | FT_UShort rp1; |
| 80 | FT_UShort rp2; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 81 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 82 | FT_UnitVector dualVector; |
| 83 | FT_UnitVector projVector; |
| 84 | FT_UnitVector freeVector; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 85 | |
David Turner | 8b6db86 | 2003-08-17 22:09:14 +0000 | [diff] [blame] | 86 | #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING |
Graham Asher | 3ea859f | 2003-04-25 11:40:46 +0000 | [diff] [blame] | 87 | FT_Bool both_x_axis; |
| 88 | #endif |
| 89 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 90 | FT_Long loop; |
| 91 | FT_F26Dot6 minimum_distance; |
| 92 | FT_Int round_state; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 93 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 94 | FT_Bool auto_flip; |
| 95 | FT_F26Dot6 control_value_cutin; |
| 96 | FT_F26Dot6 single_width_cutin; |
| 97 | FT_F26Dot6 single_width_value; |
| 98 | FT_Short delta_base; |
| 99 | FT_Short delta_shift; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 100 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 101 | FT_Byte instruct_control; |
Werner Lemberg | 105721a | 2008-11-15 10:35:51 +0000 | [diff] [blame] | 102 | /* According to Greg Hitchcock from Microsoft, the `scan_control' */ |
| 103 | /* variable as documented in the TrueType specification is a 32-bit */ |
| 104 | /* integer; the high-word part holds the SCANTYPE value, the low-word */ |
| 105 | /* part the SCANCTRL value. We separate it into two fields. */ |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 106 | FT_Bool scan_control; |
| 107 | FT_Int scan_type; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 108 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 109 | FT_UShort gep0; |
| 110 | FT_UShort gep1; |
| 111 | FT_UShort gep2; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 112 | |
| 113 | } TT_GraphicsState; |
| 114 | |
Werner Lemberg | 5811c7c | 2000-07-02 13:53:16 +0000 | [diff] [blame] | 115 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 116 | #ifdef TT_USE_BYTECODE_INTERPRETER |
Werner Lemberg | 321cd27 | 2000-07-27 11:20:20 +0000 | [diff] [blame] | 117 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 118 | FT_LOCAL( void ) |
David Turner | b08fe2d | 2002-08-27 20:20:29 +0000 | [diff] [blame] | 119 | tt_glyphzone_done( TT_GlyphZone zone ); |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 120 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 121 | FT_LOCAL( FT_Error ) |
David Turner | b08fe2d | 2002-08-27 20:20:29 +0000 | [diff] [blame] | 122 | tt_glyphzone_new( FT_Memory memory, |
Werner Lemberg | 91db04c | 2002-04-01 14:25:28 +0000 | [diff] [blame] | 123 | FT_UShort maxPoints, |
| 124 | FT_Short maxContours, |
| 125 | TT_GlyphZone zone ); |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 126 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 127 | #endif /* TT_USE_BYTECODE_INTERPRETER */ |
Werner Lemberg | 321cd27 | 2000-07-27 11:20:20 +0000 | [diff] [blame] | 128 | |
Werner Lemberg | 5811c7c | 2000-07-02 13:53:16 +0000 | [diff] [blame] | 129 | |
David Turner | c5cdf8b | 2000-07-27 21:40:22 +0000 | [diff] [blame] | 130 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 131 | /*************************************************************************/ |
| 132 | /* */ |
| 133 | /* EXECUTION SUBTABLES */ |
| 134 | /* */ |
| 135 | /* These sub-tables relate to instruction execution. */ |
| 136 | /* */ |
| 137 | /*************************************************************************/ |
| 138 | |
| 139 | |
| 140 | #define TT_MAX_CODE_RANGES 3 |
| 141 | |
| 142 | |
| 143 | /*************************************************************************/ |
| 144 | /* */ |
| 145 | /* There can only be 3 active code ranges at once: */ |
| 146 | /* - the Font Program */ |
| 147 | /* - the CVT Program */ |
| 148 | /* - a glyph's instructions set */ |
| 149 | /* */ |
| 150 | typedef enum TT_CodeRange_Tag_ |
| 151 | { |
| 152 | tt_coderange_none = 0, |
| 153 | tt_coderange_font, |
| 154 | tt_coderange_cvt, |
| 155 | tt_coderange_glyph |
| 156 | |
| 157 | } TT_CodeRange_Tag; |
| 158 | |
| 159 | |
| 160 | typedef struct TT_CodeRange_ |
| 161 | { |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 162 | FT_Byte* base; |
| 163 | FT_ULong size; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 164 | |
| 165 | } TT_CodeRange; |
| 166 | |
| 167 | typedef TT_CodeRange TT_CodeRangeTable[TT_MAX_CODE_RANGES]; |
| 168 | |
| 169 | |
| 170 | /*************************************************************************/ |
| 171 | /* */ |
| 172 | /* Defines a function/instruction definition record. */ |
| 173 | /* */ |
| 174 | typedef struct TT_DefRecord_ |
| 175 | { |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 176 | FT_Int range; /* in which code range is it located? */ |
| 177 | FT_Long start; /* where does it start? */ |
| 178 | FT_UInt opc; /* function #, or instruction code */ |
| 179 | FT_Bool active; /* is it active? */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 180 | |
| 181 | } TT_DefRecord, *TT_DefArray; |
| 182 | |
| 183 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 184 | /*************************************************************************/ |
| 185 | /* */ |
| 186 | /* Subglyph transformation record. */ |
| 187 | /* */ |
| 188 | typedef struct TT_Transform_ |
| 189 | { |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 190 | FT_Fixed xx, xy; /* transformation matrix coefficients */ |
| 191 | FT_Fixed yx, yy; |
| 192 | FT_F26Dot6 ox, oy; /* offsets */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 193 | |
| 194 | } TT_Transform; |
| 195 | |
| 196 | |
| 197 | /*************************************************************************/ |
| 198 | /* */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 199 | /* A note regarding non-squared pixels: */ |
| 200 | /* */ |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 201 | /* (This text will probably go into some docs at some time; for now, it */ |
Werner Lemberg | 38e4076 | 2009-06-16 22:41:46 +0200 | [diff] [blame] | 202 | /* is kept here to explain some definitions in the TT_Size_Metrics */ |
| 203 | /* record). */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 204 | /* */ |
| 205 | /* The CVT is a one-dimensional array containing values that control */ |
| 206 | /* certain important characteristics in a font, like the height of all */ |
| 207 | /* capitals, all lowercase letter, default spacing or stem width/height. */ |
| 208 | /* */ |
| 209 | /* These values are found in FUnits in the font file, and must be scaled */ |
| 210 | /* to pixel coordinates before being used by the CVT and glyph programs. */ |
| 211 | /* Unfortunately, when using distinct x and y resolutions (or distinct x */ |
| 212 | /* and y pointsizes), there are two possible scalings. */ |
| 213 | /* */ |
| 214 | /* A first try was to implement a `lazy' scheme where all values were */ |
| 215 | /* scaled when first used. However, while some values are always used */ |
| 216 | /* in the same direction, some others are used under many different */ |
| 217 | /* circumstances and orientations. */ |
| 218 | /* */ |
| 219 | /* I have found a simpler way to do the same, and it even seems to work */ |
| 220 | /* in most of the cases: */ |
| 221 | /* */ |
| 222 | /* - All CVT values are scaled to the maximum ppem size. */ |
| 223 | /* */ |
| 224 | /* - When performing a read or write in the CVT, a ratio factor is used */ |
| 225 | /* to perform adequate scaling. Example: */ |
| 226 | /* */ |
| 227 | /* x_ppem = 14 */ |
| 228 | /* y_ppem = 10 */ |
| 229 | /* */ |
| 230 | /* We choose ppem = x_ppem = 14 as the CVT scaling size. All cvt */ |
| 231 | /* entries are scaled to it. */ |
| 232 | /* */ |
| 233 | /* x_ratio = 1.0 */ |
| 234 | /* y_ratio = y_ppem/ppem (< 1.0) */ |
| 235 | /* */ |
| 236 | /* We compute the current ratio like: */ |
| 237 | /* */ |
| 238 | /* - If projVector is horizontal, */ |
| 239 | /* ratio = x_ratio = 1.0 */ |
| 240 | /* */ |
| 241 | /* - if projVector is vertical, */ |
| 242 | /* ratio = y_ratio */ |
| 243 | /* */ |
| 244 | /* - else, */ |
| 245 | /* ratio = sqrt( (proj.x * x_ratio) ^ 2 + (proj.y * y_ratio) ^ 2 ) */ |
| 246 | /* */ |
| 247 | /* Reading a cvt value returns */ |
| 248 | /* ratio * cvt[index] */ |
| 249 | /* */ |
| 250 | /* Writing a cvt value in pixels: */ |
| 251 | /* cvt[index] / ratio */ |
| 252 | /* */ |
| 253 | /* The current ppem is simply */ |
| 254 | /* ratio * ppem */ |
| 255 | /* */ |
| 256 | /*************************************************************************/ |
| 257 | |
| 258 | |
| 259 | /*************************************************************************/ |
| 260 | /* */ |
| 261 | /* Metrics used by the TrueType size and context objects. */ |
| 262 | /* */ |
| 263 | typedef struct TT_Size_Metrics_ |
| 264 | { |
| 265 | /* for non-square pixels */ |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 266 | FT_Long x_ratio; |
| 267 | FT_Long y_ratio; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 268 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 269 | FT_UShort ppem; /* maximum ppem size */ |
| 270 | FT_Long ratio; /* current ratio */ |
| 271 | FT_Fixed scale; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 272 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 273 | FT_F26Dot6 compensations[4]; /* device-specific compensations */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 274 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 275 | FT_Bool valid; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 276 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 277 | FT_Bool rotated; /* `is the glyph rotated?'-flag */ |
| 278 | FT_Bool stretched; /* `is the glyph stretched?'-flag */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 279 | |
| 280 | } TT_Size_Metrics; |
| 281 | |
| 282 | |
Werner Lemberg | 5811c7c | 2000-07-02 13:53:16 +0000 | [diff] [blame] | 283 | /*************************************************************************/ |
| 284 | /* */ |
| 285 | /* TrueType size class. */ |
| 286 | /* */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 287 | typedef struct TT_SizeRec_ |
| 288 | { |
| 289 | FT_SizeRec root; |
| 290 | |
Wu, Chia-I (吳佳一) | 2a41ab9 | 2005-07-26 08:14:03 +0000 | [diff] [blame] | 291 | /* we have our own copy of metrics so that we can modify */ |
| 292 | /* it without affecting auto-hinting (when used) */ |
| 293 | FT_Size_Metrics metrics; |
| 294 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 295 | TT_Size_Metrics ttmetrics; |
| 296 | |
Werner Lemberg | f1c2b91 | 2006-01-13 14:53:28 +0000 | [diff] [blame] | 297 | FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */ |
David Turner | f96594f | 2000-11-06 23:07:51 +0000 | [diff] [blame] | 298 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 299 | #ifdef TT_USE_BYTECODE_INTERPRETER |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 300 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 301 | FT_UInt num_function_defs; /* number of function definitions */ |
| 302 | FT_UInt max_function_defs; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 303 | TT_DefArray function_defs; /* table of function definitions */ |
| 304 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 305 | FT_UInt num_instruction_defs; /* number of ins. definitions */ |
| 306 | FT_UInt max_instruction_defs; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 307 | TT_DefArray instruction_defs; /* table of ins. definitions */ |
| 308 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 309 | FT_UInt max_func; |
| 310 | FT_UInt max_ins; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 311 | |
| 312 | TT_CodeRangeTable codeRangeTable; |
| 313 | |
| 314 | TT_GraphicsState GS; |
| 315 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 316 | FT_ULong cvt_size; /* the scaled control value table */ |
| 317 | FT_Long* cvt; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 318 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 319 | FT_UShort storage_size; /* The storage area is now part of */ |
| 320 | FT_Long* storage; /* the instance */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 321 | |
Werner Lemberg | 91db04c | 2002-04-01 14:25:28 +0000 | [diff] [blame] | 322 | TT_GlyphZoneRec twilight; /* The instance's twilight zone */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 323 | |
| 324 | /* debugging variables */ |
| 325 | |
| 326 | /* When using the debugger, we must keep the */ |
| 327 | /* execution context tied to the instance */ |
| 328 | /* object rather than asking it on demand. */ |
| 329 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 330 | FT_Bool debug; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 331 | TT_ExecContext context; |
| 332 | |
David Turner | 384be23 | 2007-01-05 15:32:01 +0000 | [diff] [blame] | 333 | FT_Bool bytecode_ready; |
| 334 | FT_Bool cvt_ready; |
| 335 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 336 | #endif /* TT_USE_BYTECODE_INTERPRETER */ |
David Turner | 8f43c71 | 2000-02-02 12:16:19 +0000 | [diff] [blame] | 337 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 338 | } TT_SizeRec; |
| 339 | |
| 340 | |
Werner Lemberg | 5811c7c | 2000-07-02 13:53:16 +0000 | [diff] [blame] | 341 | /*************************************************************************/ |
| 342 | /* */ |
| 343 | /* TrueType driver class. */ |
| 344 | /* */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 345 | typedef struct TT_DriverRec_ |
| 346 | { |
Werner Lemberg | 91db04c | 2002-04-01 14:25:28 +0000 | [diff] [blame] | 347 | FT_DriverRec root; |
| 348 | TT_ExecContext context; /* execution context */ |
| 349 | TT_GlyphZoneRec zone; /* glyph loader points zone */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 350 | |
Werner Lemberg | 91db04c | 2002-04-01 14:25:28 +0000 | [diff] [blame] | 351 | void* extension_component; |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 352 | |
| 353 | } TT_DriverRec; |
| 354 | |
| 355 | |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 356 | /* Note: All of the functions below (except tt_size_reset()) are used */ |
| 357 | /* as function pointers in a FT_Driver_ClassRec. Therefore their */ |
| 358 | /* parameters are of types FT_Face, FT_Size, etc., rather than TT_Face, */ |
| 359 | /* TT_Size, etc., so that the compiler can confirm that the types and */ |
| 360 | /* number of parameters are correct. In all cases the FT_xxx types are */ |
| 361 | /* cast to their TT_xxx counterparts inside the functions since FreeType */ |
| 362 | /* will always use the TT driver to create them. */ |
| 363 | |
| 364 | |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 365 | /*************************************************************************/ |
| 366 | /* */ |
| 367 | /* Face functions */ |
| 368 | /* */ |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 369 | FT_LOCAL( FT_Error ) |
David Turner | b08fe2d | 2002-08-27 20:20:29 +0000 | [diff] [blame] | 370 | tt_face_init( FT_Stream stream, |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 371 | FT_Face ttface, /* TT_Face */ |
Werner Lemberg | 4a2305c | 2001-06-28 07:17:51 +0000 | [diff] [blame] | 372 | FT_Int face_index, |
| 373 | FT_Int num_params, |
| 374 | FT_Parameter* params ); |
David Turner | 08fdac9 | 2000-02-21 16:01:33 +0000 | [diff] [blame] | 375 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 376 | FT_LOCAL( void ) |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 377 | tt_face_done( FT_Face ttface ); /* TT_Face */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 378 | |
| 379 | |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 380 | /*************************************************************************/ |
| 381 | /* */ |
| 382 | /* Size functions */ |
| 383 | /* */ |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 384 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 385 | tt_size_init( FT_Size ttsize ); /* TT_Size */ |
David Turner | 08fdac9 | 2000-02-21 16:01:33 +0000 | [diff] [blame] | 386 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 387 | FT_LOCAL( void ) |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 388 | tt_size_done( FT_Size ttsize ); /* TT_Size */ |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 389 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 390 | #ifdef TT_USE_BYTECODE_INTERPRETER |
Werner Lemberg | 8e3fc5e | 2005-08-03 21:17:53 +0000 | [diff] [blame] | 391 | |
Wu, Chia-I (吳佳一) | 89fff9b | 2005-07-31 11:41:54 +0000 | [diff] [blame] | 392 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 18931a5 | 2011-02-01 07:08:43 +0100 | [diff] [blame] | 393 | tt_size_run_fpgm( TT_Size size, |
| 394 | FT_Bool pedantic ); |
Wu, Chia-I (吳佳一) | 89fff9b | 2005-07-31 11:41:54 +0000 | [diff] [blame] | 395 | |
| 396 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 18931a5 | 2011-02-01 07:08:43 +0100 | [diff] [blame] | 397 | tt_size_run_prep( TT_Size size, |
| 398 | FT_Bool pedantic ); |
Werner Lemberg | 8e3fc5e | 2005-08-03 21:17:53 +0000 | [diff] [blame] | 399 | |
Werner Lemberg | 6ff2ff5 | 2007-05-24 19:39:14 +0000 | [diff] [blame] | 400 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 18931a5 | 2011-02-01 07:08:43 +0100 | [diff] [blame] | 401 | tt_size_ready_bytecode( TT_Size size, |
| 402 | FT_Bool pedantic ); |
Werner Lemberg | 6ff2ff5 | 2007-05-24 19:39:14 +0000 | [diff] [blame] | 403 | |
David Turner | 6aa260c | 2006-08-25 22:45:13 +0000 | [diff] [blame] | 404 | #endif /* TT_USE_BYTECODE_INTERPRETER */ |
Wu, Chia-I (吳佳一) | 89fff9b | 2005-07-31 11:41:54 +0000 | [diff] [blame] | 405 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 406 | FT_LOCAL( FT_Error ) |
David Turner | b08fe2d | 2002-08-27 20:20:29 +0000 | [diff] [blame] | 407 | tt_size_reset( TT_Size size ); |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 408 | |
| 409 | |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 410 | /*************************************************************************/ |
| 411 | /* */ |
Werner Lemberg | 78575dc | 2000-06-12 19:36:41 +0000 | [diff] [blame] | 412 | /* Driver functions */ |
| 413 | /* */ |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 414 | FT_LOCAL( FT_Error ) |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 415 | tt_driver_init( FT_Module ttdriver ); /* TT_Driver */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 416 | |
David Turner | bc82f1b | 2002-03-01 02:26:22 +0000 | [diff] [blame] | 417 | FT_LOCAL( void ) |
Werner Lemberg | 86ae11c | 2004-05-04 16:53:45 +0000 | [diff] [blame] | 418 | tt_driver_done( FT_Module ttdriver ); /* TT_Driver */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 419 | |
Werner Lemberg | 5811c7c | 2000-07-02 13:53:16 +0000 | [diff] [blame] | 420 | |
Wu, Chia-I (吳佳一) | 0142e6a | 2005-08-16 01:54:59 +0000 | [diff] [blame] | 421 | /*************************************************************************/ |
| 422 | /* */ |
Werner Lemberg | ffa033b | 2005-08-19 08:56:29 +0000 | [diff] [blame] | 423 | /* Slot functions */ |
Wu, Chia-I (吳佳一) | 0142e6a | 2005-08-16 01:54:59 +0000 | [diff] [blame] | 424 | /* */ |
| 425 | FT_LOCAL( FT_Error ) |
| 426 | tt_slot_init( FT_GlyphSlot slot ); |
| 427 | |
| 428 | |
David Turner | 19ed8af | 2000-12-08 02:42:29 +0000 | [diff] [blame] | 429 | FT_END_HEADER |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 430 | |
Werner Lemberg | 90d9964 | 2000-12-09 00:45:38 +0000 | [diff] [blame] | 431 | #endif /* __TTOBJS_H__ */ |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 432 | |
| 433 | |
| 434 | /* END */ |