OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftmodapi.h */ | 3 /* ftmodapi.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType modules public interface (specification). */ | 5 /* FreeType modules public interface (specification). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */ | 7 /* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 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 */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
(...skipping 17 matching lines...) Expand all Loading... |
35 | 35 |
36 /*************************************************************************/ | 36 /*************************************************************************/ |
37 /* */ | 37 /* */ |
38 /* <Section> */ | 38 /* <Section> */ |
39 /* module_management */ | 39 /* module_management */ |
40 /* */ | 40 /* */ |
41 /* <Title> */ | 41 /* <Title> */ |
42 /* Module Management */ | 42 /* Module Management */ |
43 /* */ | 43 /* */ |
44 /* <Abstract> */ | 44 /* <Abstract> */ |
45 /* How to add, upgrade, and remove modules from FreeType. */ | 45 /* How to add, upgrade, remove, and control modules from FreeType. */ |
46 /* */ | 46 /* */ |
47 /* <Description> */ | 47 /* <Description> */ |
48 /* The definitions below are used to manage modules within FreeType. */ | 48 /* The definitions below are used to manage modules within FreeType. */ |
49 /* Modules can be added, upgraded, and removed at runtime. */ | 49 /* Modules can be added, upgraded, and removed at runtime. */ |
| 50 /* Additionally, some module properties can be controlled also. */ |
| 51 /* */ |
| 52 /* Here is a list of possible values of the `module_name' field in */ |
| 53 /* the @FT_Module_Class structure. */ |
| 54 /* */ |
| 55 /* { */ |
| 56 /* autofitter */ |
| 57 /* bdf */ |
| 58 /* cff */ |
| 59 /* gxvalid */ |
| 60 /* otvalid */ |
| 61 /* pcf */ |
| 62 /* pfr */ |
| 63 /* psaux */ |
| 64 /* pshinter */ |
| 65 /* psnames */ |
| 66 /* raster1, raster5 */ |
| 67 /* sfnt */ |
| 68 /* smooth, smooth-lcd, smooth-lcdv */ |
| 69 /* truetype */ |
| 70 /* type1 */ |
| 71 /* type42 */ |
| 72 /* t1cid */ |
| 73 /* winfonts */ |
| 74 /* } */ |
| 75 /* */ |
| 76 /* Note that the FreeType Cache sub-system is not a FreeType module. */ |
50 /* */ | 77 /* */ |
51 /*************************************************************************/ | 78 /*************************************************************************/ |
52 | 79 |
53 | 80 |
54 /* module bit flags */ | 81 /* module bit flags */ |
55 #define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ | 82 #define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ |
56 #define FT_MODULE_RENDERER 2 /* this module is a renderer */ | 83 #define FT_MODULE_RENDERER 2 /* this module is a renderer */ |
57 #define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ | 84 #define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ |
58 #define FT_MODULE_STYLER 8 /* this module is a styler */ | 85 #define FT_MODULE_STYLER 8 /* this module is a styler */ |
59 | 86 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 138 |
112 /*************************************************************************/ | 139 /*************************************************************************/ |
113 /* */ | 140 /* */ |
114 /* <FuncType> */ | 141 /* <FuncType> */ |
115 /* FT_Module_Requester */ | 142 /* FT_Module_Requester */ |
116 /* */ | 143 /* */ |
117 /* <Description> */ | 144 /* <Description> */ |
118 /* A function used to query a given module for a specific interface. */ | 145 /* A function used to query a given module for a specific interface. */ |
119 /* */ | 146 /* */ |
120 /* <Input> */ | 147 /* <Input> */ |
121 /* module :: The module to finalize. */ | 148 /* module :: The module to be searched. */ |
122 /* */ | 149 /* */ |
123 /* name :: The name of the interface in the module. */ | 150 /* name :: The name of the interface in the module. */ |
124 /* */ | 151 /* */ |
125 typedef FT_Module_Interface | 152 typedef FT_Module_Interface |
126 (*FT_Module_Requester)( FT_Module module, | 153 (*FT_Module_Requester)( FT_Module module, |
127 const char* name ); | 154 const char* name ); |
128 | 155 |
129 | 156 |
130 /*************************************************************************/ | 157 /*************************************************************************/ |
131 /* */ | 158 /* */ |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 /* FreeType error code. 0~means success. */ | 269 /* FreeType error code. 0~means success. */ |
243 /* */ | 270 /* */ |
244 /* <Note> */ | 271 /* <Note> */ |
245 /* The module object is destroyed by the function in case of success. */ | 272 /* The module object is destroyed by the function in case of success. */ |
246 /* */ | 273 /* */ |
247 FT_EXPORT( FT_Error ) | 274 FT_EXPORT( FT_Error ) |
248 FT_Remove_Module( FT_Library library, | 275 FT_Remove_Module( FT_Library library, |
249 FT_Module module ); | 276 FT_Module module ); |
250 | 277 |
251 | 278 |
| 279 /********************************************************************** |
| 280 * |
| 281 * @function: |
| 282 * FT_Property_Set |
| 283 * |
| 284 * @description: |
| 285 * Set a property for a given module. |
| 286 * |
| 287 * @input: |
| 288 * library :: |
| 289 * A handle to the library the module is part of. |
| 290 * |
| 291 * module_name :: |
| 292 * The module name. |
| 293 * |
| 294 * property_name :: |
| 295 * The property name. Properties are described in the `Synopsis' |
| 296 * subsection of the module's documentation. |
| 297 * |
| 298 * Note that only a few modules have properties. |
| 299 * |
| 300 * value :: |
| 301 * A generic pointer to a variable or structure which gives the new |
| 302 * value of the property. The exact definition of `value' is |
| 303 * dependent on the property; see the `Synopsis' subsection of the |
| 304 * module's documentation. |
| 305 * |
| 306 * @return: |
| 307 * FreeType error code. 0~means success. |
| 308 * |
| 309 * @note: |
| 310 * If `module_name' isn't a valid module name, or `property_name' |
| 311 * doesn't specify a valid property, or if `value' doesn't represent a |
| 312 * valid value for the given property, an error is returned. |
| 313 * |
| 314 * The following example sets property `bar' (a simple integer) in |
| 315 * module `foo' to value~1. |
| 316 * |
| 317 * { |
| 318 * FT_UInt bar; |
| 319 * |
| 320 * |
| 321 * bar = 1; |
| 322 * FT_Property_Set( library, "foo", "bar", &bar ); |
| 323 * } |
| 324 * |
| 325 * Note that the FreeType Cache sub-system doesn't recognize module |
| 326 * property changes. To avoid glyph lookup confusion within the cache |
| 327 * you should call @FTC_Manager_Reset to completely flush the cache if |
| 328 * a module property gets changed after @FTC_Manager_New has been |
| 329 * called. |
| 330 * |
| 331 * It is not possible to set properties of the FreeType Cache |
| 332 * sub-system itself with FT_Property_Set; use @FTC_Property_Set |
| 333 * instead. |
| 334 * |
| 335 * @since: |
| 336 * 2.4.11 |
| 337 * |
| 338 */ |
| 339 FT_EXPORT( FT_Error ) |
| 340 FT_Property_Set( FT_Library library, |
| 341 const FT_String* module_name, |
| 342 const FT_String* property_name, |
| 343 const void* value ); |
| 344 |
| 345 |
| 346 /********************************************************************** |
| 347 * |
| 348 * @function: |
| 349 * FT_Property_Get |
| 350 * |
| 351 * @description: |
| 352 * Get a module's property value. |
| 353 * |
| 354 * @input: |
| 355 * library :: |
| 356 * A handle to the library the module is part of. |
| 357 * |
| 358 * module_name :: |
| 359 * The module name. |
| 360 * |
| 361 * property_name :: |
| 362 * The property name. Properties are described in the `Synopsis' |
| 363 * subsection of the module's documentation. |
| 364 * |
| 365 * @inout: |
| 366 * value :: |
| 367 * A generic pointer to a variable or structure which gives the |
| 368 * value of the property. The exact definition of `value' is |
| 369 * dependent on the property; see the `Synopsis' subsection of the |
| 370 * module's documentation. |
| 371 * |
| 372 * @return: |
| 373 * FreeType error code. 0~means success. |
| 374 * |
| 375 * @note: |
| 376 * If `module_name' isn't a valid module name, or `property_name' |
| 377 * doesn't specify a valid property, or if `value' doesn't represent a |
| 378 * valid value for the given property, an error is returned. |
| 379 * |
| 380 * The following example gets property `baz' (a range) in module `foo'. |
| 381 * |
| 382 * { |
| 383 * typedef range_ |
| 384 * { |
| 385 * FT_Int32 min; |
| 386 * FT_Int32 max; |
| 387 * |
| 388 * } range; |
| 389 * |
| 390 * range baz; |
| 391 * |
| 392 * |
| 393 * FT_Property_Get( library, "foo", "baz", &baz ); |
| 394 * } |
| 395 * |
| 396 * It is not possible to retrieve properties of the FreeType Cache |
| 397 * sub-system with FT_Property_Get; use @FTC_Property_Get instead. |
| 398 * |
| 399 * @since: |
| 400 * 2.4.11 |
| 401 * |
| 402 */ |
| 403 FT_EXPORT( FT_Error ) |
| 404 FT_Property_Get( FT_Library library, |
| 405 const FT_String* module_name, |
| 406 const FT_String* property_name, |
| 407 void* value ); |
| 408 |
| 409 |
252 /*************************************************************************/ | 410 /*************************************************************************/ |
253 /* */ | 411 /* */ |
254 /* <Function> */ | 412 /* <Function> */ |
255 /* FT_Reference_Library */ | 413 /* FT_Reference_Library */ |
256 /* */ | 414 /* */ |
257 /* <Description> */ | 415 /* <Description> */ |
258 /* A counter gets initialized to~1 at the time an @FT_Library */ | 416 /* A counter gets initialized to~1 at the time an @FT_Library */ |
259 /* structure is created. This function increments the counter. */ | 417 /* structure is created. This function increments the counter. */ |
260 /* @FT_Done_Library then only destroys a library if the counter is~1, */ | 418 /* @FT_Done_Library then only destroys a library if the counter is~1, */ |
261 /* otherwise it simply decrements the counter. */ | 419 /* otherwise it simply decrements the counter. */ |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 * The library doesn't implement any kind of bytecode interpreter. | 581 * The library doesn't implement any kind of bytecode interpreter. |
424 * | 582 * |
425 * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: | 583 * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: |
426 * The library implements a bytecode interpreter that doesn't | 584 * The library implements a bytecode interpreter that doesn't |
427 * support the patented operations of the TrueType virtual machine. | 585 * support the patented operations of the TrueType virtual machine. |
428 * | 586 * |
429 * Its main use is to load certain Asian fonts which position and | 587 * Its main use is to load certain Asian fonts which position and |
430 * scale glyph components with bytecode instructions. It produces | 588 * scale glyph components with bytecode instructions. It produces |
431 * bad output for most other fonts. | 589 * bad output for most other fonts. |
432 * | 590 * |
433 * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: | 591 * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: |
434 * The library implements a bytecode interpreter that covers | 592 * The library implements a bytecode interpreter that covers |
435 * the full instruction set of the TrueType virtual machine (this | 593 * the full instruction set of the TrueType virtual machine (this |
436 * was governed by patents until May 2010, hence the name). | 594 * was governed by patents until May 2010, hence the name). |
437 * | 595 * |
438 * @since: | 596 * @since: |
439 * 2.2 | 597 * 2.2 |
440 * | 598 * |
441 */ | 599 */ |
442 typedef enum FT_TrueTypeEngineType_ | 600 typedef enum FT_TrueTypeEngineType_ |
443 { | 601 { |
444 FT_TRUETYPE_ENGINE_TYPE_NONE = 0, | 602 FT_TRUETYPE_ENGINE_TYPE_NONE = 0, |
445 FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, | 603 FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, |
446 FT_TRUETYPE_ENGINE_TYPE_PATENTED | 604 FT_TRUETYPE_ENGINE_TYPE_PATENTED |
447 | 605 |
448 } FT_TrueTypeEngineType; | 606 } FT_TrueTypeEngineType; |
449 | 607 |
(...skipping 24 matching lines...) Expand all Loading... |
474 | 632 |
475 /* */ | 633 /* */ |
476 | 634 |
477 | 635 |
478 FT_END_HEADER | 636 FT_END_HEADER |
479 | 637 |
480 #endif /* __FTMODAPI_H__ */ | 638 #endif /* __FTMODAPI_H__ */ |
481 | 639 |
482 | 640 |
483 /* END */ | 641 /* END */ |
OLD | NEW |