vrshoot
diff libs/ft2static/freetype/internal/pshints.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/internal/pshints.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,712 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* pshints.h */ 1.7 +/* */ 1.8 +/* Interface to Postscript-specific (Type 1 and Type 2) hints */ 1.9 +/* recorders (specification only). These are used to support native */ 1.10 +/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ 1.11 +/* */ 1.12 +/* Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009 by */ 1.13 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.14 +/* */ 1.15 +/* This file is part of the FreeType project, and may only be used, */ 1.16 +/* modified, and distributed under the terms of the FreeType project */ 1.17 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.18 +/* this file you indicate that you have read the license and */ 1.19 +/* understand and accept it fully. */ 1.20 +/* */ 1.21 +/***************************************************************************/ 1.22 + 1.23 + 1.24 +#ifndef __PSHINTS_H__ 1.25 +#define __PSHINTS_H__ 1.26 + 1.27 + 1.28 +#include <ft2build.h> 1.29 +#include FT_FREETYPE_H 1.30 +#include FT_TYPE1_TABLES_H 1.31 + 1.32 + 1.33 +FT_BEGIN_HEADER 1.34 + 1.35 + 1.36 + /*************************************************************************/ 1.37 + /*************************************************************************/ 1.38 + /***** *****/ 1.39 + /***** INTERNAL REPRESENTATION OF GLOBALS *****/ 1.40 + /***** *****/ 1.41 + /*************************************************************************/ 1.42 + /*************************************************************************/ 1.43 + 1.44 + typedef struct PSH_GlobalsRec_* PSH_Globals; 1.45 + 1.46 + typedef FT_Error 1.47 + (*PSH_Globals_NewFunc)( FT_Memory memory, 1.48 + T1_Private* private_dict, 1.49 + PSH_Globals* aglobals ); 1.50 + 1.51 + typedef FT_Error 1.52 + (*PSH_Globals_SetScaleFunc)( PSH_Globals globals, 1.53 + FT_Fixed x_scale, 1.54 + FT_Fixed y_scale, 1.55 + FT_Fixed x_delta, 1.56 + FT_Fixed y_delta ); 1.57 + 1.58 + typedef void 1.59 + (*PSH_Globals_DestroyFunc)( PSH_Globals globals ); 1.60 + 1.61 + 1.62 + typedef struct PSH_Globals_FuncsRec_ 1.63 + { 1.64 + PSH_Globals_NewFunc create; 1.65 + PSH_Globals_SetScaleFunc set_scale; 1.66 + PSH_Globals_DestroyFunc destroy; 1.67 + 1.68 + } PSH_Globals_FuncsRec, *PSH_Globals_Funcs; 1.69 + 1.70 + 1.71 + /*************************************************************************/ 1.72 + /*************************************************************************/ 1.73 + /***** *****/ 1.74 + /***** PUBLIC TYPE 1 HINTS RECORDER *****/ 1.75 + /***** *****/ 1.76 + /*************************************************************************/ 1.77 + /*************************************************************************/ 1.78 + 1.79 + /************************************************************************* 1.80 + * 1.81 + * @type: 1.82 + * T1_Hints 1.83 + * 1.84 + * @description: 1.85 + * This is a handle to an opaque structure used to record glyph hints 1.86 + * from a Type 1 character glyph character string. 1.87 + * 1.88 + * The methods used to operate on this object are defined by the 1.89 + * @T1_Hints_FuncsRec structure. Recording glyph hints is normally 1.90 + * achieved through the following scheme: 1.91 + * 1.92 + * - Open a new hint recording session by calling the `open' method. 1.93 + * This rewinds the recorder and prepare it for new input. 1.94 + * 1.95 + * - For each hint found in the glyph charstring, call the corresponding 1.96 + * method (`stem', `stem3', or `reset'). Note that these functions do 1.97 + * not return an error code. 1.98 + * 1.99 + * - Close the recording session by calling the `close' method. It 1.100 + * returns an error code if the hints were invalid or something 1.101 + * strange happened (e.g., memory shortage). 1.102 + * 1.103 + * The hints accumulated in the object can later be used by the 1.104 + * PostScript hinter. 1.105 + * 1.106 + */ 1.107 + typedef struct T1_HintsRec_* T1_Hints; 1.108 + 1.109 + 1.110 + /************************************************************************* 1.111 + * 1.112 + * @type: 1.113 + * T1_Hints_Funcs 1.114 + * 1.115 + * @description: 1.116 + * A pointer to the @T1_Hints_FuncsRec structure that defines the API of 1.117 + * a given @T1_Hints object. 1.118 + * 1.119 + */ 1.120 + typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs; 1.121 + 1.122 + 1.123 + /************************************************************************* 1.124 + * 1.125 + * @functype: 1.126 + * T1_Hints_OpenFunc 1.127 + * 1.128 + * @description: 1.129 + * A method of the @T1_Hints class used to prepare it for a new Type 1 1.130 + * hints recording session. 1.131 + * 1.132 + * @input: 1.133 + * hints :: 1.134 + * A handle to the Type 1 hints recorder. 1.135 + * 1.136 + * @note: 1.137 + * You should always call the @T1_Hints_CloseFunc method in order to 1.138 + * close an opened recording session. 1.139 + * 1.140 + */ 1.141 + typedef void 1.142 + (*T1_Hints_OpenFunc)( T1_Hints hints ); 1.143 + 1.144 + 1.145 + /************************************************************************* 1.146 + * 1.147 + * @functype: 1.148 + * T1_Hints_SetStemFunc 1.149 + * 1.150 + * @description: 1.151 + * A method of the @T1_Hints class used to record a new horizontal or 1.152 + * vertical stem. This corresponds to the Type 1 `hstem' and `vstem' 1.153 + * operators. 1.154 + * 1.155 + * @input: 1.156 + * hints :: 1.157 + * A handle to the Type 1 hints recorder. 1.158 + * 1.159 + * dimension :: 1.160 + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). 1.161 + * 1.162 + * coords :: 1.163 + * Array of 2 coordinates in 16.16 format, used as (position,length) 1.164 + * stem descriptor. 1.165 + * 1.166 + * @note: 1.167 + * Use vertical coordinates (y) for horizontal stems (dim=0). Use 1.168 + * horizontal coordinates (x) for vertical stems (dim=1). 1.169 + * 1.170 + * `coords[0]' is the absolute stem position (lowest coordinate); 1.171 + * `coords[1]' is the length. 1.172 + * 1.173 + * The length can be negative, in which case it must be either -20 or 1.174 + * -21. It is interpreted as a `ghost' stem, according to the Type 1 1.175 + * specification. 1.176 + * 1.177 + * If the length is -21 (corresponding to a bottom ghost stem), then 1.178 + * the real stem position is `coords[0]+coords[1]'. 1.179 + * 1.180 + */ 1.181 + typedef void 1.182 + (*T1_Hints_SetStemFunc)( T1_Hints hints, 1.183 + FT_UInt dimension, 1.184 + FT_Fixed* coords ); 1.185 + 1.186 + 1.187 + /************************************************************************* 1.188 + * 1.189 + * @functype: 1.190 + * T1_Hints_SetStem3Func 1.191 + * 1.192 + * @description: 1.193 + * A method of the @T1_Hints class used to record three 1.194 + * counter-controlled horizontal or vertical stems at once. 1.195 + * 1.196 + * @input: 1.197 + * hints :: 1.198 + * A handle to the Type 1 hints recorder. 1.199 + * 1.200 + * dimension :: 1.201 + * 0 for horizontal stems, 1 for vertical ones. 1.202 + * 1.203 + * coords :: 1.204 + * An array of 6 values in 16.16 format, holding 3 (position,length) 1.205 + * pairs for the counter-controlled stems. 1.206 + * 1.207 + * @note: 1.208 + * Use vertical coordinates (y) for horizontal stems (dim=0). Use 1.209 + * horizontal coordinates (x) for vertical stems (dim=1). 1.210 + * 1.211 + * The lengths cannot be negative (ghost stems are never 1.212 + * counter-controlled). 1.213 + * 1.214 + */ 1.215 + typedef void 1.216 + (*T1_Hints_SetStem3Func)( T1_Hints hints, 1.217 + FT_UInt dimension, 1.218 + FT_Fixed* coords ); 1.219 + 1.220 + 1.221 + /************************************************************************* 1.222 + * 1.223 + * @functype: 1.224 + * T1_Hints_ResetFunc 1.225 + * 1.226 + * @description: 1.227 + * A method of the @T1_Hints class used to reset the stems hints in a 1.228 + * recording session. 1.229 + * 1.230 + * @input: 1.231 + * hints :: 1.232 + * A handle to the Type 1 hints recorder. 1.233 + * 1.234 + * end_point :: 1.235 + * The index of the last point in the input glyph in which the 1.236 + * previously defined hints apply. 1.237 + * 1.238 + */ 1.239 + typedef void 1.240 + (*T1_Hints_ResetFunc)( T1_Hints hints, 1.241 + FT_UInt end_point ); 1.242 + 1.243 + 1.244 + /************************************************************************* 1.245 + * 1.246 + * @functype: 1.247 + * T1_Hints_CloseFunc 1.248 + * 1.249 + * @description: 1.250 + * A method of the @T1_Hints class used to close a hint recording 1.251 + * session. 1.252 + * 1.253 + * @input: 1.254 + * hints :: 1.255 + * A handle to the Type 1 hints recorder. 1.256 + * 1.257 + * end_point :: 1.258 + * The index of the last point in the input glyph. 1.259 + * 1.260 + * @return: 1.261 + * FreeType error code. 0 means success. 1.262 + * 1.263 + * @note: 1.264 + * The error code is set to indicate that an error occurred during the 1.265 + * recording session. 1.266 + * 1.267 + */ 1.268 + typedef FT_Error 1.269 + (*T1_Hints_CloseFunc)( T1_Hints hints, 1.270 + FT_UInt end_point ); 1.271 + 1.272 + 1.273 + /************************************************************************* 1.274 + * 1.275 + * @functype: 1.276 + * T1_Hints_ApplyFunc 1.277 + * 1.278 + * @description: 1.279 + * A method of the @T1_Hints class used to apply hints to the 1.280 + * corresponding glyph outline. Must be called once all hints have been 1.281 + * recorded. 1.282 + * 1.283 + * @input: 1.284 + * hints :: 1.285 + * A handle to the Type 1 hints recorder. 1.286 + * 1.287 + * outline :: 1.288 + * A pointer to the target outline descriptor. 1.289 + * 1.290 + * globals :: 1.291 + * The hinter globals for this font. 1.292 + * 1.293 + * hint_mode :: 1.294 + * Hinting information. 1.295 + * 1.296 + * @return: 1.297 + * FreeType error code. 0 means success. 1.298 + * 1.299 + * @note: 1.300 + * On input, all points within the outline are in font coordinates. On 1.301 + * output, they are in 1/64th of pixels. 1.302 + * 1.303 + * The scaling transformation is taken from the `globals' object which 1.304 + * must correspond to the same font as the glyph. 1.305 + * 1.306 + */ 1.307 + typedef FT_Error 1.308 + (*T1_Hints_ApplyFunc)( T1_Hints hints, 1.309 + FT_Outline* outline, 1.310 + PSH_Globals globals, 1.311 + FT_Render_Mode hint_mode ); 1.312 + 1.313 + 1.314 + /************************************************************************* 1.315 + * 1.316 + * @struct: 1.317 + * T1_Hints_FuncsRec 1.318 + * 1.319 + * @description: 1.320 + * The structure used to provide the API to @T1_Hints objects. 1.321 + * 1.322 + * @fields: 1.323 + * hints :: 1.324 + * A handle to the T1 Hints recorder. 1.325 + * 1.326 + * open :: 1.327 + * The function to open a recording session. 1.328 + * 1.329 + * close :: 1.330 + * The function to close a recording session. 1.331 + * 1.332 + * stem :: 1.333 + * The function to set a simple stem. 1.334 + * 1.335 + * stem3 :: 1.336 + * The function to set counter-controlled stems. 1.337 + * 1.338 + * reset :: 1.339 + * The function to reset stem hints. 1.340 + * 1.341 + * apply :: 1.342 + * The function to apply the hints to the corresponding glyph outline. 1.343 + * 1.344 + */ 1.345 + typedef struct T1_Hints_FuncsRec_ 1.346 + { 1.347 + T1_Hints hints; 1.348 + T1_Hints_OpenFunc open; 1.349 + T1_Hints_CloseFunc close; 1.350 + T1_Hints_SetStemFunc stem; 1.351 + T1_Hints_SetStem3Func stem3; 1.352 + T1_Hints_ResetFunc reset; 1.353 + T1_Hints_ApplyFunc apply; 1.354 + 1.355 + } T1_Hints_FuncsRec; 1.356 + 1.357 + 1.358 + /*************************************************************************/ 1.359 + /*************************************************************************/ 1.360 + /***** *****/ 1.361 + /***** PUBLIC TYPE 2 HINTS RECORDER *****/ 1.362 + /***** *****/ 1.363 + /*************************************************************************/ 1.364 + /*************************************************************************/ 1.365 + 1.366 + /************************************************************************* 1.367 + * 1.368 + * @type: 1.369 + * T2_Hints 1.370 + * 1.371 + * @description: 1.372 + * This is a handle to an opaque structure used to record glyph hints 1.373 + * from a Type 2 character glyph character string. 1.374 + * 1.375 + * The methods used to operate on this object are defined by the 1.376 + * @T2_Hints_FuncsRec structure. Recording glyph hints is normally 1.377 + * achieved through the following scheme: 1.378 + * 1.379 + * - Open a new hint recording session by calling the `open' method. 1.380 + * This rewinds the recorder and prepare it for new input. 1.381 + * 1.382 + * - For each hint found in the glyph charstring, call the corresponding 1.383 + * method (`stems', `hintmask', `counters'). Note that these 1.384 + * functions do not return an error code. 1.385 + * 1.386 + * - Close the recording session by calling the `close' method. It 1.387 + * returns an error code if the hints were invalid or something 1.388 + * strange happened (e.g., memory shortage). 1.389 + * 1.390 + * The hints accumulated in the object can later be used by the 1.391 + * Postscript hinter. 1.392 + * 1.393 + */ 1.394 + typedef struct T2_HintsRec_* T2_Hints; 1.395 + 1.396 + 1.397 + /************************************************************************* 1.398 + * 1.399 + * @type: 1.400 + * T2_Hints_Funcs 1.401 + * 1.402 + * @description: 1.403 + * A pointer to the @T2_Hints_FuncsRec structure that defines the API of 1.404 + * a given @T2_Hints object. 1.405 + * 1.406 + */ 1.407 + typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs; 1.408 + 1.409 + 1.410 + /************************************************************************* 1.411 + * 1.412 + * @functype: 1.413 + * T2_Hints_OpenFunc 1.414 + * 1.415 + * @description: 1.416 + * A method of the @T2_Hints class used to prepare it for a new Type 2 1.417 + * hints recording session. 1.418 + * 1.419 + * @input: 1.420 + * hints :: 1.421 + * A handle to the Type 2 hints recorder. 1.422 + * 1.423 + * @note: 1.424 + * You should always call the @T2_Hints_CloseFunc method in order to 1.425 + * close an opened recording session. 1.426 + * 1.427 + */ 1.428 + typedef void 1.429 + (*T2_Hints_OpenFunc)( T2_Hints hints ); 1.430 + 1.431 + 1.432 + /************************************************************************* 1.433 + * 1.434 + * @functype: 1.435 + * T2_Hints_StemsFunc 1.436 + * 1.437 + * @description: 1.438 + * A method of the @T2_Hints class used to set the table of stems in 1.439 + * either the vertical or horizontal dimension. Equivalent to the 1.440 + * `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators. 1.441 + * 1.442 + * @input: 1.443 + * hints :: 1.444 + * A handle to the Type 2 hints recorder. 1.445 + * 1.446 + * dimension :: 1.447 + * 0 for horizontal stems (hstem), 1 for vertical ones (vstem). 1.448 + * 1.449 + * count :: 1.450 + * The number of stems. 1.451 + * 1.452 + * coords :: 1.453 + * An array of `count' (position,length) pairs in 16.16 format. 1.454 + * 1.455 + * @note: 1.456 + * Use vertical coordinates (y) for horizontal stems (dim=0). Use 1.457 + * horizontal coordinates (x) for vertical stems (dim=1). 1.458 + * 1.459 + * There are `2*count' elements in the `coords' array. Each even 1.460 + * element is an absolute position in font units, each odd element is a 1.461 + * length in font units. 1.462 + * 1.463 + * A length can be negative, in which case it must be either -20 or 1.464 + * -21. It is interpreted as a `ghost' stem, according to the Type 1 1.465 + * specification. 1.466 + * 1.467 + */ 1.468 + typedef void 1.469 + (*T2_Hints_StemsFunc)( T2_Hints hints, 1.470 + FT_UInt dimension, 1.471 + FT_UInt count, 1.472 + FT_Fixed* coordinates ); 1.473 + 1.474 + 1.475 + /************************************************************************* 1.476 + * 1.477 + * @functype: 1.478 + * T2_Hints_MaskFunc 1.479 + * 1.480 + * @description: 1.481 + * A method of the @T2_Hints class used to set a given hintmask (this 1.482 + * corresponds to the `hintmask' Type 2 operator). 1.483 + * 1.484 + * @input: 1.485 + * hints :: 1.486 + * A handle to the Type 2 hints recorder. 1.487 + * 1.488 + * end_point :: 1.489 + * The glyph index of the last point to which the previously defined 1.490 + * or activated hints apply. 1.491 + * 1.492 + * bit_count :: 1.493 + * The number of bits in the hint mask. 1.494 + * 1.495 + * bytes :: 1.496 + * An array of bytes modelling the hint mask. 1.497 + * 1.498 + * @note: 1.499 + * If the hintmask starts the charstring (before any glyph point 1.500 + * definition), the value of `end_point' should be 0. 1.501 + * 1.502 + * `bit_count' is the number of meaningful bits in the `bytes' array; it 1.503 + * must be equal to the total number of hints defined so far (i.e., 1.504 + * horizontal+verticals). 1.505 + * 1.506 + * The `bytes' array can come directly from the Type 2 charstring and 1.507 + * respects the same format. 1.508 + * 1.509 + */ 1.510 + typedef void 1.511 + (*T2_Hints_MaskFunc)( T2_Hints hints, 1.512 + FT_UInt end_point, 1.513 + FT_UInt bit_count, 1.514 + const FT_Byte* bytes ); 1.515 + 1.516 + 1.517 + /************************************************************************* 1.518 + * 1.519 + * @functype: 1.520 + * T2_Hints_CounterFunc 1.521 + * 1.522 + * @description: 1.523 + * A method of the @T2_Hints class used to set a given counter mask 1.524 + * (this corresponds to the `hintmask' Type 2 operator). 1.525 + * 1.526 + * @input: 1.527 + * hints :: 1.528 + * A handle to the Type 2 hints recorder. 1.529 + * 1.530 + * end_point :: 1.531 + * A glyph index of the last point to which the previously defined or 1.532 + * active hints apply. 1.533 + * 1.534 + * bit_count :: 1.535 + * The number of bits in the hint mask. 1.536 + * 1.537 + * bytes :: 1.538 + * An array of bytes modelling the hint mask. 1.539 + * 1.540 + * @note: 1.541 + * If the hintmask starts the charstring (before any glyph point 1.542 + * definition), the value of `end_point' should be 0. 1.543 + * 1.544 + * `bit_count' is the number of meaningful bits in the `bytes' array; it 1.545 + * must be equal to the total number of hints defined so far (i.e., 1.546 + * horizontal+verticals). 1.547 + * 1.548 + * The `bytes' array can come directly from the Type 2 charstring and 1.549 + * respects the same format. 1.550 + * 1.551 + */ 1.552 + typedef void 1.553 + (*T2_Hints_CounterFunc)( T2_Hints hints, 1.554 + FT_UInt bit_count, 1.555 + const FT_Byte* bytes ); 1.556 + 1.557 + 1.558 + /************************************************************************* 1.559 + * 1.560 + * @functype: 1.561 + * T2_Hints_CloseFunc 1.562 + * 1.563 + * @description: 1.564 + * A method of the @T2_Hints class used to close a hint recording 1.565 + * session. 1.566 + * 1.567 + * @input: 1.568 + * hints :: 1.569 + * A handle to the Type 2 hints recorder. 1.570 + * 1.571 + * end_point :: 1.572 + * The index of the last point in the input glyph. 1.573 + * 1.574 + * @return: 1.575 + * FreeType error code. 0 means success. 1.576 + * 1.577 + * @note: 1.578 + * The error code is set to indicate that an error occurred during the 1.579 + * recording session. 1.580 + * 1.581 + */ 1.582 + typedef FT_Error 1.583 + (*T2_Hints_CloseFunc)( T2_Hints hints, 1.584 + FT_UInt end_point ); 1.585 + 1.586 + 1.587 + /************************************************************************* 1.588 + * 1.589 + * @functype: 1.590 + * T2_Hints_ApplyFunc 1.591 + * 1.592 + * @description: 1.593 + * A method of the @T2_Hints class used to apply hints to the 1.594 + * corresponding glyph outline. Must be called after the `close' 1.595 + * method. 1.596 + * 1.597 + * @input: 1.598 + * hints :: 1.599 + * A handle to the Type 2 hints recorder. 1.600 + * 1.601 + * outline :: 1.602 + * A pointer to the target outline descriptor. 1.603 + * 1.604 + * globals :: 1.605 + * The hinter globals for this font. 1.606 + * 1.607 + * hint_mode :: 1.608 + * Hinting information. 1.609 + * 1.610 + * @return: 1.611 + * FreeType error code. 0 means success. 1.612 + * 1.613 + * @note: 1.614 + * On input, all points within the outline are in font coordinates. On 1.615 + * output, they are in 1/64th of pixels. 1.616 + * 1.617 + * The scaling transformation is taken from the `globals' object which 1.618 + * must correspond to the same font than the glyph. 1.619 + * 1.620 + */ 1.621 + typedef FT_Error 1.622 + (*T2_Hints_ApplyFunc)( T2_Hints hints, 1.623 + FT_Outline* outline, 1.624 + PSH_Globals globals, 1.625 + FT_Render_Mode hint_mode ); 1.626 + 1.627 + 1.628 + /************************************************************************* 1.629 + * 1.630 + * @struct: 1.631 + * T2_Hints_FuncsRec 1.632 + * 1.633 + * @description: 1.634 + * The structure used to provide the API to @T2_Hints objects. 1.635 + * 1.636 + * @fields: 1.637 + * hints :: 1.638 + * A handle to the T2 hints recorder object. 1.639 + * 1.640 + * open :: 1.641 + * The function to open a recording session. 1.642 + * 1.643 + * close :: 1.644 + * The function to close a recording session. 1.645 + * 1.646 + * stems :: 1.647 + * The function to set the dimension's stems table. 1.648 + * 1.649 + * hintmask :: 1.650 + * The function to set hint masks. 1.651 + * 1.652 + * counter :: 1.653 + * The function to set counter masks. 1.654 + * 1.655 + * apply :: 1.656 + * The function to apply the hints on the corresponding glyph outline. 1.657 + * 1.658 + */ 1.659 + typedef struct T2_Hints_FuncsRec_ 1.660 + { 1.661 + T2_Hints hints; 1.662 + T2_Hints_OpenFunc open; 1.663 + T2_Hints_CloseFunc close; 1.664 + T2_Hints_StemsFunc stems; 1.665 + T2_Hints_MaskFunc hintmask; 1.666 + T2_Hints_CounterFunc counter; 1.667 + T2_Hints_ApplyFunc apply; 1.668 + 1.669 + } T2_Hints_FuncsRec; 1.670 + 1.671 + 1.672 + /* */ 1.673 + 1.674 + 1.675 + typedef struct PSHinter_Interface_ 1.676 + { 1.677 + PSH_Globals_Funcs (*get_globals_funcs)( FT_Module module ); 1.678 + T1_Hints_Funcs (*get_t1_funcs) ( FT_Module module ); 1.679 + T2_Hints_Funcs (*get_t2_funcs) ( FT_Module module ); 1.680 + 1.681 + } PSHinter_Interface; 1.682 + 1.683 + typedef PSHinter_Interface* PSHinter_Service; 1.684 + 1.685 +#ifndef FT_CONFIG_OPTION_PIC 1.686 + 1.687 +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ 1.688 + get_t1_funcs_, get_t2_funcs_) \ 1.689 + static const PSHinter_Interface class_ = \ 1.690 + { \ 1.691 + get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \ 1.692 + }; 1.693 + 1.694 +#else /* FT_CONFIG_OPTION_PIC */ 1.695 + 1.696 +#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \ 1.697 + get_t1_funcs_, get_t2_funcs_) \ 1.698 + void \ 1.699 + FT_Init_Class_##class_( FT_Library library, \ 1.700 + PSHinter_Interface* clazz) \ 1.701 + { \ 1.702 + FT_UNUSED(library); \ 1.703 + clazz->get_globals_funcs = get_globals_funcs_; \ 1.704 + clazz->get_t1_funcs = get_t1_funcs_; \ 1.705 + clazz->get_t2_funcs = get_t2_funcs_; \ 1.706 + } 1.707 + 1.708 +#endif /* FT_CONFIG_OPTION_PIC */ 1.709 + 1.710 +FT_END_HEADER 1.711 + 1.712 +#endif /* __PSHINTS_H__ */ 1.713 + 1.714 + 1.715 +/* END */