OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ttdriver.c */ | 3 /* ttdriver.c */ |
4 /* */ | 4 /* */ |
5 /* TrueType font driver implementation (body). */ | 5 /* TrueType font driver implementation (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2012 by */ | 7 /* Copyright 1996-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 |
18 | 18 |
19 #include <ft2build.h> | 19 #include <ft2build.h> |
20 #include FT_INTERNAL_DEBUG_H | 20 #include FT_INTERNAL_DEBUG_H |
21 #include FT_INTERNAL_STREAM_H | 21 #include FT_INTERNAL_STREAM_H |
22 #include FT_INTERNAL_SFNT_H | 22 #include FT_INTERNAL_SFNT_H |
23 #include FT_SERVICE_XFREE86_NAME_H | 23 #include FT_SERVICE_XFREE86_NAME_H |
24 | 24 |
25 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT | 25 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
26 #include FT_MULTIPLE_MASTERS_H | 26 #include FT_MULTIPLE_MASTERS_H |
27 #include FT_SERVICE_MULTIPLE_MASTERS_H | 27 #include FT_SERVICE_MULTIPLE_MASTERS_H |
28 #endif | 28 #endif |
29 | 29 |
30 #include FT_SERVICE_TRUETYPE_ENGINE_H | 30 #include FT_SERVICE_TRUETYPE_ENGINE_H |
31 #include FT_SERVICE_TRUETYPE_GLYF_H | 31 #include FT_SERVICE_TRUETYPE_GLYF_H |
| 32 #include FT_SERVICE_PROPERTIES_H |
| 33 #include FT_TRUETYPE_DRIVER_H |
32 | 34 |
33 #include "ttdriver.h" | 35 #include "ttdriver.h" |
34 #include "ttgload.h" | 36 #include "ttgload.h" |
35 #include "ttpload.h" | 37 #include "ttpload.h" |
36 | 38 |
37 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT | 39 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
38 #include "ttgxvar.h" | 40 #include "ttgxvar.h" |
39 #endif | 41 #endif |
40 | 42 |
41 #include "tterrors.h" | 43 #include "tterrors.h" |
42 | 44 |
43 #include "ttpic.h" | 45 #include "ttpic.h" |
44 | 46 |
45 /*************************************************************************/ | 47 /*************************************************************************/ |
46 /* */ | 48 /* */ |
47 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ | 49 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ |
48 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ | 50 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ |
49 /* messages during execution. */ | 51 /* messages during execution. */ |
50 /* */ | 52 /* */ |
51 #undef FT_COMPONENT | 53 #undef FT_COMPONENT |
52 #define FT_COMPONENT trace_ttdriver | 54 #define FT_COMPONENT trace_ttdriver |
53 | 55 |
54 | 56 |
| 57 /* |
| 58 * PROPERTY SERVICE |
| 59 * |
| 60 */ |
| 61 static FT_Error |
| 62 tt_property_set( FT_Module module, /* TT_Driver */ |
| 63 const char* property_name, |
| 64 const void* value ) |
| 65 { |
| 66 FT_Error error = FT_Err_Ok; |
| 67 TT_Driver driver = (TT_Driver)module; |
| 68 |
| 69 |
| 70 if ( !ft_strcmp( property_name, "interpreter-version" ) ) |
| 71 { |
| 72 FT_UInt* interpreter_version = (FT_UInt*)value; |
| 73 |
| 74 |
| 75 #ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING |
| 76 if ( *interpreter_version != TT_INTERPRETER_VERSION_35 ) |
| 77 error = FT_ERR( Unimplemented_Feature ); |
| 78 else |
| 79 #endif |
| 80 driver->interpreter_version = *interpreter_version; |
| 81 |
| 82 return error; |
| 83 } |
| 84 |
| 85 FT_TRACE0(( "tt_property_set: missing property `%s'\n", |
| 86 property_name )); |
| 87 return FT_THROW( Missing_Property ); |
| 88 } |
| 89 |
| 90 |
| 91 static FT_Error |
| 92 tt_property_get( FT_Module module, /* TT_Driver */ |
| 93 const char* property_name, |
| 94 const void* value ) |
| 95 { |
| 96 FT_Error error = FT_Err_Ok; |
| 97 TT_Driver driver = (TT_Driver)module; |
| 98 |
| 99 FT_UInt interpreter_version = driver->interpreter_version; |
| 100 |
| 101 |
| 102 if ( !ft_strcmp( property_name, "interpreter-version" ) ) |
| 103 { |
| 104 FT_UInt* val = (FT_UInt*)value; |
| 105 |
| 106 |
| 107 *val = interpreter_version; |
| 108 |
| 109 return error; |
| 110 } |
| 111 |
| 112 FT_TRACE0(( "tt_property_get: missing property `%s'\n", |
| 113 property_name )); |
| 114 return FT_THROW( Missing_Property ); |
| 115 } |
| 116 |
| 117 |
| 118 FT_DEFINE_SERVICE_PROPERTIESREC( |
| 119 tt_service_properties, |
| 120 (FT_Properties_SetFunc)tt_property_set, |
| 121 (FT_Properties_GetFunc)tt_property_get ) |
| 122 |
| 123 |
55 /*************************************************************************/ | 124 /*************************************************************************/ |
56 /*************************************************************************/ | 125 /*************************************************************************/ |
57 /*************************************************************************/ | 126 /*************************************************************************/ |
58 /**** ****/ | 127 /**** ****/ |
59 /**** ****/ | 128 /**** ****/ |
60 /**** F A C E S ****/ | 129 /**** F A C E S ****/ |
61 /**** ****/ | 130 /**** ****/ |
62 /**** ****/ | 131 /**** ****/ |
63 /*************************************************************************/ | 132 /*************************************************************************/ |
64 /*************************************************************************/ | 133 /*************************************************************************/ |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 { | 225 { |
157 FT_Short lsb; | 226 FT_Short lsb; |
158 FT_UShort aw; | 227 FT_UShort aw; |
159 | 228 |
160 | 229 |
161 TT_Get_HMetrics( face, start + nn, &lsb, &aw ); | 230 TT_Get_HMetrics( face, start + nn, &lsb, &aw ); |
162 advances[nn] = aw; | 231 advances[nn] = aw; |
163 } | 232 } |
164 } | 233 } |
165 | 234 |
166 return TT_Err_Ok; | 235 return FT_Err_Ok; |
167 } | 236 } |
168 | 237 |
169 /*************************************************************************/ | 238 /*************************************************************************/ |
170 /*************************************************************************/ | 239 /*************************************************************************/ |
171 /*************************************************************************/ | 240 /*************************************************************************/ |
172 /**** ****/ | 241 /**** ****/ |
173 /**** ****/ | 242 /**** ****/ |
174 /**** S I Z E S ****/ | 243 /**** S I Z E S ****/ |
175 /**** ****/ | 244 /**** ****/ |
176 /**** ****/ | 245 /**** ****/ |
177 /*************************************************************************/ | 246 /*************************************************************************/ |
178 /*************************************************************************/ | 247 /*************************************************************************/ |
179 /*************************************************************************/ | 248 /*************************************************************************/ |
180 | 249 |
181 | 250 |
182 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS | 251 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
183 | 252 |
184 static FT_Error | 253 static FT_Error |
185 tt_size_select( FT_Size size, | 254 tt_size_select( FT_Size size, |
186 FT_ULong strike_index ) | 255 FT_ULong strike_index ) |
187 { | 256 { |
188 TT_Face ttface = (TT_Face)size->face; | 257 TT_Face ttface = (TT_Face)size->face; |
189 TT_Size ttsize = (TT_Size)size; | 258 TT_Size ttsize = (TT_Size)size; |
190 FT_Error error = TT_Err_Ok; | 259 FT_Error error = FT_Err_Ok; |
191 | 260 |
192 | 261 |
193 ttsize->strike_index = strike_index; | 262 ttsize->strike_index = strike_index; |
194 | 263 |
195 if ( FT_IS_SCALABLE( size->face ) ) | 264 if ( FT_IS_SCALABLE( size->face ) ) |
196 { | 265 { |
197 /* use the scaled metrics, even when tt_size_reset fails */ | 266 /* use the scaled metrics, even when tt_size_reset fails */ |
198 FT_Select_Metrics( size->face, strike_index ); | 267 FT_Select_Metrics( size->face, strike_index ); |
199 | 268 |
200 tt_size_reset( ttsize ); | 269 tt_size_reset( ttsize ); |
(...skipping 13 matching lines...) Expand all Loading... |
214 } | 283 } |
215 | 284 |
216 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ | 285 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ |
217 | 286 |
218 | 287 |
219 static FT_Error | 288 static FT_Error |
220 tt_size_request( FT_Size size, | 289 tt_size_request( FT_Size size, |
221 FT_Size_Request req ) | 290 FT_Size_Request req ) |
222 { | 291 { |
223 TT_Size ttsize = (TT_Size)size; | 292 TT_Size ttsize = (TT_Size)size; |
224 FT_Error error = TT_Err_Ok; | 293 FT_Error error = FT_Err_Ok; |
225 | 294 |
226 | 295 |
227 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS | 296 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
228 | 297 |
229 if ( FT_HAS_FIXED_SIZES( size->face ) ) | 298 if ( FT_HAS_FIXED_SIZES( size->face ) ) |
230 { | 299 { |
231 TT_Face ttface = (TT_Face)size->face; | 300 TT_Face ttface = (TT_Face)size->face; |
232 SFNT_Service sfnt = (SFNT_Service) ttface->sfnt; | 301 SFNT_Service sfnt = (SFNT_Service) ttface->sfnt; |
233 FT_ULong strike_index; | 302 FT_ULong strike_index; |
234 | 303 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 FT_UInt glyph_index, | 356 FT_UInt glyph_index, |
288 FT_Int32 load_flags ) | 357 FT_Int32 load_flags ) |
289 { | 358 { |
290 TT_GlyphSlot slot = (TT_GlyphSlot)ttslot; | 359 TT_GlyphSlot slot = (TT_GlyphSlot)ttslot; |
291 TT_Size size = (TT_Size)ttsize; | 360 TT_Size size = (TT_Size)ttsize; |
292 FT_Face face = ttslot->face; | 361 FT_Face face = ttslot->face; |
293 FT_Error error; | 362 FT_Error error; |
294 | 363 |
295 | 364 |
296 if ( !slot ) | 365 if ( !slot ) |
297 return TT_Err_Invalid_Slot_Handle; | 366 return FT_THROW( Invalid_Slot_Handle ); |
298 | 367 |
299 if ( !size ) | 368 if ( !size ) |
300 return TT_Err_Invalid_Size_Handle; | 369 return FT_THROW( Invalid_Size_Handle ); |
301 | 370 |
302 if ( !face ) | 371 if ( !face ) |
303 return TT_Err_Invalid_Argument; | 372 return FT_THROW( Invalid_Argument ); |
304 | 373 |
305 #ifdef FT_CONFIG_OPTION_INCREMENTAL | 374 #ifdef FT_CONFIG_OPTION_INCREMENTAL |
306 if ( glyph_index >= (FT_UInt)face->num_glyphs && | 375 if ( glyph_index >= (FT_UInt)face->num_glyphs && |
307 !face->internal->incremental_interface ) | 376 !face->internal->incremental_interface ) |
308 #else | 377 #else |
309 if ( glyph_index >= (FT_UInt)face->num_glyphs ) | 378 if ( glyph_index >= (FT_UInt)face->num_glyphs ) |
310 #endif | 379 #endif |
311 return TT_Err_Invalid_Argument; | 380 return FT_THROW( Invalid_Argument ); |
312 | 381 |
313 if ( load_flags & FT_LOAD_NO_HINTING ) | 382 if ( load_flags & FT_LOAD_NO_HINTING ) |
314 { | 383 { |
315 /* both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT */ | 384 /* both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT */ |
316 /* are necessary to disable hinting for tricky fonts */ | 385 /* are necessary to disable hinting for tricky fonts */ |
317 | 386 |
318 if ( FT_IS_TRICKY( face ) ) | 387 if ( FT_IS_TRICKY( face ) ) |
319 load_flags &= ~FT_LOAD_NO_HINTING; | 388 load_flags &= ~FT_LOAD_NO_HINTING; |
320 | 389 |
321 if ( load_flags & FT_LOAD_NO_AUTOHINT ) | 390 if ( load_flags & FT_LOAD_NO_AUTOHINT ) |
(...skipping 24 matching lines...) Expand all Loading... |
346 /**** ****/ | 415 /**** ****/ |
347 /**** ****/ | 416 /**** ****/ |
348 /**** D R I V E R I N T E R F A C E ****/ | 417 /**** D R I V E R I N T E R F A C E ****/ |
349 /**** ****/ | 418 /**** ****/ |
350 /**** ****/ | 419 /**** ****/ |
351 /*************************************************************************/ | 420 /*************************************************************************/ |
352 /*************************************************************************/ | 421 /*************************************************************************/ |
353 /*************************************************************************/ | 422 /*************************************************************************/ |
354 | 423 |
355 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT | 424 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
356 FT_DEFINE_SERVICE_MULTIMASTERSREC(tt_service_gx_multi_masters, | 425 FT_DEFINE_SERVICE_MULTIMASTERSREC( |
| 426 tt_service_gx_multi_masters, |
357 (FT_Get_MM_Func) NULL, | 427 (FT_Get_MM_Func) NULL, |
358 (FT_Set_MM_Design_Func) NULL, | 428 (FT_Set_MM_Design_Func) NULL, |
359 (FT_Set_MM_Blend_Func) TT_Set_MM_Blend, | 429 (FT_Set_MM_Blend_Func) TT_Set_MM_Blend, |
360 (FT_Get_MM_Var_Func) TT_Get_MM_Var, | 430 (FT_Get_MM_Var_Func) TT_Get_MM_Var, |
361 (FT_Set_Var_Design_Func)TT_Set_Var_Design | 431 (FT_Set_Var_Design_Func)TT_Set_Var_Design ) |
362 ) | |
363 #endif | 432 #endif |
364 | 433 |
365 static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine = | 434 static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine = |
366 { | 435 { |
367 #ifdef TT_USE_BYTECODE_INTERPRETER | 436 #ifdef TT_USE_BYTECODE_INTERPRETER |
368 | 437 |
369 #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING | 438 #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING |
370 FT_TRUETYPE_ENGINE_TYPE_UNPATENTED | 439 FT_TRUETYPE_ENGINE_TYPE_UNPATENTED |
371 #else | 440 #else |
372 FT_TRUETYPE_ENGINE_TYPE_PATENTED | 441 FT_TRUETYPE_ENGINE_TYPE_PATENTED |
373 #endif | 442 #endif |
374 | 443 |
375 #else /* !TT_USE_BYTECODE_INTERPRETER */ | 444 #else /* !TT_USE_BYTECODE_INTERPRETER */ |
376 | 445 |
377 FT_TRUETYPE_ENGINE_TYPE_NONE | 446 FT_TRUETYPE_ENGINE_TYPE_NONE |
378 | 447 |
379 #endif /* TT_USE_BYTECODE_INTERPRETER */ | 448 #endif /* TT_USE_BYTECODE_INTERPRETER */ |
380 }; | 449 }; |
381 | 450 |
382 FT_DEFINE_SERVICE_TTGLYFREC(tt_service_truetype_glyf, | 451 FT_DEFINE_SERVICE_TTGLYFREC( |
383 (TT_Glyf_GetLocationFunc)tt_face_get_location | 452 tt_service_truetype_glyf, |
384 ) | 453 (TT_Glyf_GetLocationFunc)tt_face_get_location ) |
385 | 454 |
386 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT | 455 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT |
387 FT_DEFINE_SERVICEDESCREC4(tt_services, | 456 FT_DEFINE_SERVICEDESCREC5( |
| 457 tt_services, |
388 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, | 458 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, |
389 FT_SERVICE_ID_MULTI_MASTERS, &FT_TT_SERVICE_GX_MULTI_MASTERS_GET, | 459 FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET, |
390 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, | 460 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, |
391 FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET | 461 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, |
392 ) | 462 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) |
393 #else | 463 #else |
394 FT_DEFINE_SERVICEDESCREC3(tt_services, | 464 FT_DEFINE_SERVICEDESCREC4( |
| 465 tt_services, |
395 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, | 466 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, |
396 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, | 467 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, |
397 FT_SERVICE_ID_TT_GLYF, &FT_TT_SERVICE_TRUETYPE_GLYF_GET | 468 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, |
398 ) | 469 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) |
399 #endif | 470 #endif |
400 | 471 |
| 472 |
401 FT_CALLBACK_DEF( FT_Module_Interface ) | 473 FT_CALLBACK_DEF( FT_Module_Interface ) |
402 tt_get_interface( FT_Module driver, /* TT_Driver */ | 474 tt_get_interface( FT_Module driver, /* TT_Driver */ |
403 const char* tt_interface ) | 475 const char* tt_interface ) |
404 { | 476 { |
405 FT_Library library; | 477 FT_Library library; |
406 FT_Module_Interface result; | 478 FT_Module_Interface result; |
407 FT_Module sfntd; | 479 FT_Module sfntd; |
408 SFNT_Service sfnt; | 480 SFNT_Service sfnt; |
409 | 481 |
410 | 482 |
411 /* FT_TT_SERVICES_GET derefers `library' in PIC mode */ | 483 /* TT_SERVICES_GET derefers `library' in PIC mode */ |
412 #ifdef FT_CONFIG_OPTION_PIC | 484 #ifdef FT_CONFIG_OPTION_PIC |
413 if ( !driver ) | 485 if ( !driver ) |
414 return NULL; | 486 return NULL; |
415 library = driver->library; | 487 library = driver->library; |
416 if ( !library ) | 488 if ( !library ) |
417 return NULL; | 489 return NULL; |
418 #endif | 490 #endif |
419 | 491 |
420 result = ft_service_list_lookup( FT_TT_SERVICES_GET, tt_interface ); | 492 result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface ); |
421 if ( result != NULL ) | 493 if ( result != NULL ) |
422 return result; | 494 return result; |
423 | 495 |
424 #ifndef FT_CONFIG_OPTION_PIC | 496 #ifndef FT_CONFIG_OPTION_PIC |
425 if ( !driver ) | 497 if ( !driver ) |
426 return NULL; | 498 return NULL; |
427 library = driver->library; | 499 library = driver->library; |
428 if ( !library ) | 500 if ( !library ) |
429 return NULL; | 501 return NULL; |
430 #endif | 502 #endif |
431 | 503 |
432 /* only return the default interface from the SFNT module */ | 504 /* only return the default interface from the SFNT module */ |
433 sfntd = FT_Get_Module( library, "sfnt" ); | 505 sfntd = FT_Get_Module( library, "sfnt" ); |
434 if ( sfntd ) | 506 if ( sfntd ) |
435 { | 507 { |
436 sfnt = (SFNT_Service)( sfntd->clazz->module_interface ); | 508 sfnt = (SFNT_Service)( sfntd->clazz->module_interface ); |
437 if ( sfnt ) | 509 if ( sfnt ) |
438 return sfnt->get_interface( driver, tt_interface ); | 510 return sfnt->get_interface( driver, tt_interface ); |
439 } | 511 } |
440 | 512 |
441 return 0; | 513 return 0; |
442 } | 514 } |
443 | 515 |
444 | 516 |
445 /* The FT_DriverInterface structure is defined in ftdriver.h. */ | 517 /* The FT_DriverInterface structure is defined in ftdriver.h. */ |
446 | 518 |
447 #ifdef TT_USE_BYTECODE_INTERPRETER | 519 #ifdef TT_USE_BYTECODE_INTERPRETER |
448 #define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER | 520 #define TT_HINTER_FLAG FT_MODULE_DRIVER_HAS_HINTER |
449 #else | 521 #else |
450 #define TT_HINTER_FLAG 0 | 522 #define TT_HINTER_FLAG 0 |
451 #endif | 523 #endif |
452 | 524 |
453 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS | 525 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
454 #define TT_SIZE_SELECT tt_size_select | 526 #define TT_SIZE_SELECT tt_size_select |
455 #else | 527 #else |
456 #define TT_SIZE_SELECT 0 | 528 #define TT_SIZE_SELECT 0 |
457 #endif | 529 #endif |
458 | 530 |
459 FT_DEFINE_DRIVER( tt_driver_class, | 531 FT_DEFINE_DRIVER( |
| 532 tt_driver_class, |
460 | 533 |
461 FT_MODULE_FONT_DRIVER | | 534 FT_MODULE_FONT_DRIVER | |
462 FT_MODULE_DRIVER_SCALABLE | | 535 FT_MODULE_DRIVER_SCALABLE | |
463 TT_HINTER_FLAG, | 536 TT_HINTER_FLAG, |
464 | 537 |
465 sizeof ( TT_DriverRec ), | 538 sizeof ( TT_DriverRec ), |
466 | 539 |
467 "truetype", /* driver name */ | 540 "truetype", /* driver name */ |
468 0x10000L, /* driver version == 1.0 */ | 541 0x10000L, /* driver version == 1.0 */ |
469 0x20000L, /* driver requires FreeType 2.0 or above */ | 542 0x20000L, /* driver requires FreeType 2.0 or above */ |
470 | 543 |
471 (void*)0, /* driver specific interface */ | 544 (void*)0, /* driver specific interface */ |
472 | 545 |
473 tt_driver_init, | 546 tt_driver_init, |
474 tt_driver_done, | 547 tt_driver_done, |
475 tt_get_interface, | 548 tt_get_interface, |
476 | 549 |
477 sizeof ( TT_FaceRec ), | 550 sizeof ( TT_FaceRec ), |
478 sizeof ( TT_SizeRec ), | 551 sizeof ( TT_SizeRec ), |
479 sizeof ( FT_GlyphSlotRec ), | 552 sizeof ( FT_GlyphSlotRec ), |
480 | 553 |
481 tt_face_init, | 554 tt_face_init, |
482 tt_face_done, | 555 tt_face_done, |
483 tt_size_init, | 556 tt_size_init, |
484 tt_size_done, | 557 tt_size_done, |
485 tt_slot_init, | 558 tt_slot_init, |
486 0, /* FT_Slot_DoneFunc */ | 559 0, /* FT_Slot_DoneFunc */ |
487 | 560 |
488 ft_stub_set_char_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ | |
489 ft_stub_set_pixel_sizes, /* FT_CONFIG_OPTION_OLD_INTERNALS */ | |
490 | |
491 tt_glyph_load, | 561 tt_glyph_load, |
492 | 562 |
493 tt_get_kerning, | 563 tt_get_kerning, |
494 0, /* FT_Face_AttachFunc */ | 564 0, /* FT_Face_AttachFunc */ |
495 tt_get_advances, | 565 tt_get_advances, |
496 | 566 |
497 tt_size_request, | 567 tt_size_request, |
498 TT_SIZE_SELECT | 568 TT_SIZE_SELECT |
499 ) | 569 ) |
500 | 570 |
501 | 571 |
502 /* END */ | 572 /* END */ |
OLD | NEW |