Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: src/cff/cffobjs.c

Issue 89753003: Update freetype to latest version of ASOP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src/third_party/freetype.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cff/cffobjs.h ('k') | src/cff/cffparse.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /***************************************************************************/ 1 /***************************************************************************/
2 /* */ 2 /* */
3 /* cffobjs.c */ 3 /* cffobjs.c */
4 /* */ 4 /* */
5 /* OpenType objects manager (body). */ 5 /* OpenType objects manager (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
20 #include FT_INTERNAL_DEBUG_H 21 #include FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_CALC_H 22 #include FT_INTERNAL_CALC_H
22 #include FT_INTERNAL_STREAM_H 23 #include FT_INTERNAL_STREAM_H
23 #include FT_ERRORS_H 24 #include FT_ERRORS_H
24 #include FT_TRUETYPE_IDS_H 25 #include FT_TRUETYPE_IDS_H
25 #include FT_TRUETYPE_TAGS_H 26 #include FT_TRUETYPE_TAGS_H
26 #include FT_INTERNAL_SFNT_H 27 #include FT_INTERNAL_SFNT_H
28 #include FT_CFF_DRIVER_H
29
27 #include "cffobjs.h" 30 #include "cffobjs.h"
28 #include "cffload.h" 31 #include "cffload.h"
29 #include "cffcmap.h" 32 #include "cffcmap.h"
33 #include "cffpic.h"
34
30 #include "cfferrs.h" 35 #include "cfferrs.h"
31 #include "cffpic.h"
32 36
33 37
34 /*************************************************************************/ 38 /*************************************************************************/
35 /* */ 39 /* */
36 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ 40 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
37 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ 41 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
38 /* messages during execution. */ 42 /* messages during execution. */
39 /* */ 43 /* */
40 #undef FT_COMPONENT 44 #undef FT_COMPONENT
41 #define FT_COMPONENT trace_cffobjs 45 #define FT_COMPONENT trace_cffobjs
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 priv->force_bold = cpriv->force_bold; 150 priv->force_bold = cpriv->force_bold;
147 priv->language_group = cpriv->language_group; 151 priv->language_group = cpriv->language_group;
148 priv->lenIV = cpriv->lenIV; 152 priv->lenIV = cpriv->lenIV;
149 } 153 }
150 154
151 155
152 FT_LOCAL_DEF( FT_Error ) 156 FT_LOCAL_DEF( FT_Error )
153 cff_size_init( FT_Size cffsize ) /* CFF_Size */ 157 cff_size_init( FT_Size cffsize ) /* CFF_Size */
154 { 158 {
155 CFF_Size size = (CFF_Size)cffsize; 159 CFF_Size size = (CFF_Size)cffsize;
156 FT_Error error = CFF_Err_Ok; 160 FT_Error error = FT_Err_Ok;
157 PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size ); 161 PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
158 162
159 163
160 if ( funcs ) 164 if ( funcs )
161 { 165 {
162 CFF_Face face = (CFF_Face)cffsize->face; 166 CFF_Face face = (CFF_Face)cffsize->face;
163 CFF_Font font = (CFF_Font)face->extra.data; 167 CFF_Font font = (CFF_Font)face->extra.data;
164 CFF_Internal internal = NULL; 168 CFF_Internal internal = NULL;
165 169
166 PS_PrivateRec priv; 170 PS_PrivateRec priv;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 { 250 {
247 x_scale = size->metrics.x_scale; 251 x_scale = size->metrics.x_scale;
248 y_scale = size->metrics.y_scale; 252 y_scale = size->metrics.y_scale;
249 } 253 }
250 254
251 funcs->set_scale( internal->subfonts[i - 1], 255 funcs->set_scale( internal->subfonts[i - 1],
252 x_scale, y_scale, 0, 0 ); 256 x_scale, y_scale, 0, 0 );
253 } 257 }
254 } 258 }
255 259
256 return CFF_Err_Ok; 260 return FT_Err_Ok;
257 } 261 }
258 262
259 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ 263 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
260 264
261 265
262 FT_LOCAL_DEF( FT_Error ) 266 FT_LOCAL_DEF( FT_Error )
263 cff_size_request( FT_Size size, 267 cff_size_request( FT_Size size,
264 FT_Size_Request req ) 268 FT_Size_Request req )
265 { 269 {
266 CFF_Size cffsize = (CFF_Size)size; 270 CFF_Size cffsize = (CFF_Size)size;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 { 322 {
319 x_scale = size->metrics.x_scale; 323 x_scale = size->metrics.x_scale;
320 y_scale = size->metrics.y_scale; 324 y_scale = size->metrics.y_scale;
321 } 325 }
322 326
323 funcs->set_scale( internal->subfonts[i - 1], 327 funcs->set_scale( internal->subfonts[i - 1],
324 x_scale, y_scale, 0, 0 ); 328 x_scale, y_scale, 0, 0 );
325 } 329 }
326 } 330 }
327 331
328 return CFF_Err_Ok; 332 return FT_Err_Ok;
329 } 333 }
330 334
331 335
332 /*************************************************************************/ 336 /*************************************************************************/
333 /* */ 337 /* */
334 /* SLOT FUNCTIONS */ 338 /* SLOT FUNCTIONS */
335 /* */ 339 /* */
336 /*************************************************************************/ 340 /*************************************************************************/
337 341
338 FT_LOCAL_DEF( void ) 342 FT_LOCAL_DEF( void )
(...skipping 21 matching lines...) Expand all
360 if ( module ) 364 if ( module )
361 { 365 {
362 T2_Hints_Funcs funcs; 366 T2_Hints_Funcs funcs;
363 367
364 368
365 funcs = pshinter->get_t2_funcs( module ); 369 funcs = pshinter->get_t2_funcs( module );
366 slot->internal->glyph_hints = (void*)funcs; 370 slot->internal->glyph_hints = (void*)funcs;
367 } 371 }
368 } 372 }
369 373
370 return CFF_Err_Ok; 374 return FT_Err_Ok;
371 } 375 }
372 376
373 377
374 /*************************************************************************/ 378 /*************************************************************************/
375 /* */ 379 /* */
376 /* FACE FUNCTIONS */ 380 /* FACE FUNCTIONS */
377 /* */ 381 /* */
378 /*************************************************************************/ 382 /*************************************************************************/
379 383
380 static FT_String* 384 static FT_String*
(...skipping 13 matching lines...) Expand all
394 398
395 399
396 /* Strip all subset prefixes of the form `ABCDEF+'. Usually, there */ 400 /* Strip all subset prefixes of the form `ABCDEF+'. Usually, there */
397 /* is only one, but font names like `APCOOG+JFABTD+FuturaBQ-Bold' */ 401 /* is only one, but font names like `APCOOG+JFABTD+FuturaBQ-Bold' */
398 /* have been seen in the wild. */ 402 /* have been seen in the wild. */
399 403
400 static void 404 static void
401 remove_subset_prefix( FT_String* name ) 405 remove_subset_prefix( FT_String* name )
402 { 406 {
403 FT_Int32 idx = 0; 407 FT_Int32 idx = 0;
404 FT_Int32 length = strlen( name ) + 1; 408 FT_Int32 length = (FT_Int32)strlen( name ) + 1;
405 FT_Bool continue_search = 1; 409 FT_Bool continue_search = 1;
406 410
407 411
408 while ( continue_search ) 412 while ( continue_search )
409 { 413 {
410 if ( length >= 7 && name[6] == '+' ) 414 if ( length >= 7 && name[6] == '+' )
411 { 415 {
412 for ( idx = 0; idx < 6; idx++ ) 416 for ( idx = 0; idx < 6; idx++ )
413 { 417 {
414 /* ASCII uppercase letters */ 418 /* ASCII uppercase letters */
(...skipping 16 matching lines...) Expand all
431 435
432 /* Remove the style part from the family name (if present). */ 436 /* Remove the style part from the family name (if present). */
433 437
434 static void 438 static void
435 remove_style( FT_String* family_name, 439 remove_style( FT_String* family_name,
436 const FT_String* style_name ) 440 const FT_String* style_name )
437 { 441 {
438 FT_Int32 family_name_length, style_name_length; 442 FT_Int32 family_name_length, style_name_length;
439 443
440 444
441 family_name_length = strlen( family_name ); 445 family_name_length = (FT_Int32)strlen( family_name );
442 style_name_length = strlen( style_name ); 446 style_name_length = (FT_Int32)strlen( style_name );
443 447
444 if ( family_name_length > style_name_length ) 448 if ( family_name_length > style_name_length )
445 { 449 {
446 FT_Int idx; 450 FT_Int idx;
447 451
448 452
449 for ( idx = 1; idx <= style_name_length; ++idx ) 453 for ( idx = 1; idx <= style_name_length; ++idx )
450 { 454 {
451 if ( family_name[family_name_length - idx] != 455 if ( family_name[family_name_length - idx] !=
452 style_name[style_name_length - idx] ) 456 style_name[style_name_length - idx] )
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 FT_Bool pure_cff = 1; 493 FT_Bool pure_cff = 1;
490 FT_Bool sfnt_format = 0; 494 FT_Bool sfnt_format = 0;
491 FT_Library library = cffface->driver->root.library; 495 FT_Library library = cffface->driver->root.library;
492 496
493 497
494 sfnt = (SFNT_Service)FT_Get_Module_Interface( 498 sfnt = (SFNT_Service)FT_Get_Module_Interface(
495 library, "sfnt" ); 499 library, "sfnt" );
496 if ( !sfnt ) 500 if ( !sfnt )
497 { 501 {
498 FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" )); 502 FT_ERROR(( "cff_face_init: cannot access `sfnt' module\n" ));
499 error = CFF_Err_Missing_Module; 503 error = FT_THROW( Missing_Module );
500 goto Exit; 504 goto Exit;
501 } 505 }
502 506
503 FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS ); 507 FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
504 508
505 pshinter = (PSHinter_Service)FT_Get_Module_Interface( 509 pshinter = (PSHinter_Service)FT_Get_Module_Interface(
506 library, "pshinter" ); 510 library, "pshinter" );
507 511
508 FT_TRACE2(( "CFF driver\n" )); 512 FT_TRACE2(( "CFF driver\n" ));
509 513
510 /* create input stream from resource */ 514 /* create input stream from resource */
511 if ( FT_STREAM_SEEK( 0 ) ) 515 if ( FT_STREAM_SEEK( 0 ) )
512 goto Exit; 516 goto Exit;
513 517
514 /* check whether we have a valid OpenType file */ 518 /* check whether we have a valid OpenType file */
515 error = sfnt->init_face( stream, face, face_index, num_params, params ); 519 error = sfnt->init_face( stream, face, face_index, num_params, params );
516 if ( !error ) 520 if ( !error )
517 { 521 {
518 if ( face->format_tag != TTAG_OTTO ) /* `OTTO'; OpenType/CFF font */ 522 if ( face->format_tag != TTAG_OTTO ) /* `OTTO'; OpenType/CFF font */
519 { 523 {
520 FT_TRACE2(( " not an OpenType/CFF font\n" )); 524 FT_TRACE2(( " not an OpenType/CFF font\n" ));
521 error = CFF_Err_Unknown_File_Format; 525 error = FT_THROW( Unknown_File_Format );
522 goto Exit; 526 goto Exit;
523 } 527 }
524 528
525 /* if we are performing a simple font format check, exit immediately */ 529 /* if we are performing a simple font format check, exit immediately */
526 if ( face_index < 0 ) 530 if ( face_index < 0 )
527 return CFF_Err_Ok; 531 return FT_Err_Ok;
528
529 /* UNDOCUMENTED! A CFF in an SFNT can have only a single font. */
530 if ( face_index > 0 )
531 {
532 FT_ERROR(( "cff_face_init: invalid face index\n" ));
533 error = CFF_Err_Invalid_Argument;
534 goto Exit;
535 }
536 532
537 sfnt_format = 1; 533 sfnt_format = 1;
538 534
539 /* now, the font can be either an OpenType/CFF font, or an SVG CEF */ 535 /* now, the font can be either an OpenType/CFF font, or an SVG CEF */
540 /* font; in the latter case it doesn't have a `head' table */ 536 /* font; in the latter case it doesn't have a `head' table */
541 error = face->goto_table( face, TTAG_head, stream, 0 ); 537 error = face->goto_table( face, TTAG_head, stream, 0 );
542 if ( !error ) 538 if ( !error )
543 { 539 {
544 pure_cff = 0; 540 pure_cff = 0;
545 541
546 /* load font directory */ 542 /* load font directory */
547 error = sfnt->load_face( stream, face, 0, num_params, params ); 543 error = sfnt->load_face( stream, face, face_index,
544 num_params, params );
548 if ( error ) 545 if ( error )
549 goto Exit; 546 goto Exit;
550 } 547 }
551 else 548 else
552 { 549 {
553 /* load the `cmap' table explicitly */ 550 /* load the `cmap' table explicitly */
554 error = sfnt->load_cmap( face, stream ); 551 error = sfnt->load_cmap( face, stream );
555 if ( error ) 552 if ( error )
556 goto Exit; 553 goto Exit;
557
558 /* XXX: we don't load the GPOS table, as OpenType Layout */
559 /* support will be added later to a layout library on top of */
560 /* FreeType 2 */
561 } 554 }
562 555
563 /* now load the CFF part of the file */ 556 /* now load the CFF part of the file */
564 error = face->goto_table( face, TTAG_CFF, stream, 0 ); 557 error = face->goto_table( face, TTAG_CFF, stream, 0 );
565 if ( error ) 558 if ( error )
566 goto Exit; 559 goto Exit;
567 } 560 }
568 else 561 else
569 { 562 {
570 /* rewind to start of file; we are going to load a pure-CFF font */ 563 /* rewind to start of file; we are going to load a pure-CFF font */
571 if ( FT_STREAM_SEEK( 0 ) ) 564 if ( FT_STREAM_SEEK( 0 ) )
572 goto Exit; 565 goto Exit;
573 error = CFF_Err_Ok; 566 error = FT_Err_Ok;
574 } 567 }
575 568
576 /* now load and parse the CFF table in the file */ 569 /* now load and parse the CFF table in the file */
577 { 570 {
578 CFF_Font cff = NULL; 571 CFF_Font cff = NULL;
579 CFF_FontRecDict dict; 572 CFF_FontRecDict dict;
580 FT_Memory memory = cffface->memory; 573 FT_Memory memory = cffface->memory;
581 FT_Int32 flags; 574 FT_Int32 flags;
582 FT_UInt i; 575 FT_UInt i;
583 576
(...skipping 20 matching lines...) Expand all
604 dict = &cff->top_font.font_dict; 597 dict = &cff->top_font.font_dict;
605 598
606 /* we need the `PSNames' module for CFF and CEF formats */ 599 /* we need the `PSNames' module for CFF and CEF formats */
607 /* which aren't CID-keyed */ 600 /* which aren't CID-keyed */
608 if ( dict->cid_registry == 0xFFFFU && !psnames ) 601 if ( dict->cid_registry == 0xFFFFU && !psnames )
609 { 602 {
610 FT_ERROR(( "cff_face_init:" 603 FT_ERROR(( "cff_face_init:"
611 " cannot open CFF & CEF fonts\n" 604 " cannot open CFF & CEF fonts\n"
612 " " 605 " "
613 " without the `PSNames' module\n" )); 606 " without the `PSNames' module\n" ));
614 error = CFF_Err_Missing_Module; 607 error = FT_THROW( Missing_Module );
615 goto Exit; 608 goto Exit;
616 } 609 }
617 610
618 #ifdef FT_DEBUG_LEVEL_TRACE 611 #ifdef FT_DEBUG_LEVEL_TRACE
619 { 612 {
620 FT_UInt idx; 613 FT_UInt idx;
621 FT_String* s; 614 FT_String* s;
622 615
623 616
624 FT_TRACE4(( "SIDs\n" )); 617 FT_TRACE4(( "SIDs\n" ));
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 #endif 954 #endif
962 955
963 /* we didn't find a Unicode charmap -- synthesize one */ 956 /* we didn't find a Unicode charmap -- synthesize one */
964 cmaprec.face = cffface; 957 cmaprec.face = cffface;
965 cmaprec.platform_id = TT_PLATFORM_MICROSOFT; 958 cmaprec.platform_id = TT_PLATFORM_MICROSOFT;
966 cmaprec.encoding_id = TT_MS_ID_UNICODE_CS; 959 cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;
967 cmaprec.encoding = FT_ENCODING_UNICODE; 960 cmaprec.encoding = FT_ENCODING_UNICODE;
968 961
969 nn = (FT_UInt)cffface->num_charmaps; 962 nn = (FT_UInt)cffface->num_charmaps;
970 963
971 error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, 964 error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
972 &cmaprec, NULL ); 965 &cmaprec, NULL );
973 if ( error && FT_Err_No_Unicode_Glyph_Name != error ) 966 if ( error &&
967 FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
974 goto Exit; 968 goto Exit;
975 error = FT_Err_Ok; 969 error = FT_Err_Ok;
976 970
977 /* if no Unicode charmap was previously selected, select this one */ 971 /* if no Unicode charmap was previously selected, select this one */
978 if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps ) 972 if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )
979 cffface->charmap = cffface->charmaps[nn]; 973 cffface->charmap = cffface->charmaps[nn];
980 974
981 Skip_Unicode: 975 Skip_Unicode:
982 #ifdef FT_MAX_CHARMAP_CACHEABLE 976 #ifdef FT_MAX_CHARMAP_CACHEABLE
983 if ( nn > FT_MAX_CHARMAP_CACHEABLE ) 977 if ( nn > FT_MAX_CHARMAP_CACHEABLE )
984 { 978 {
985 FT_ERROR(( "cff_face_init: Unicode cmap is found, " 979 FT_ERROR(( "cff_face_init: Unicode cmap is found, "
986 "but too many preceding subtables (%d) to access\n", 980 "but too many preceding subtables (%d) to access\n",
987 nn - 1 )); 981 nn - 1 ));
988 goto Exit; 982 goto Exit;
989 } 983 }
990 #endif 984 #endif
991 if ( encoding->count > 0 ) 985 if ( encoding->count > 0 )
992 { 986 {
993 FT_CMap_Class clazz; 987 FT_CMap_Class clazz;
994 988
995 989
996 cmaprec.face = cffface; 990 cmaprec.face = cffface;
997 cmaprec.platform_id = TT_PLATFORM_ADOBE; /* Adobe platform id */ 991 cmaprec.platform_id = TT_PLATFORM_ADOBE; /* Adobe platform id */
998 992
999 if ( encoding->offset == 0 ) 993 if ( encoding->offset == 0 )
1000 { 994 {
1001 cmaprec.encoding_id = TT_ADOBE_ID_STANDARD; 995 cmaprec.encoding_id = TT_ADOBE_ID_STANDARD;
1002 cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD; 996 cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD;
1003 clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; 997 clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
1004 } 998 }
1005 else if ( encoding->offset == 1 ) 999 else if ( encoding->offset == 1 )
1006 { 1000 {
1007 cmaprec.encoding_id = TT_ADOBE_ID_EXPERT; 1001 cmaprec.encoding_id = TT_ADOBE_ID_EXPERT;
1008 cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT; 1002 cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT;
1009 clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; 1003 clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
1010 } 1004 }
1011 else 1005 else
1012 { 1006 {
1013 cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM; 1007 cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM;
1014 cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM; 1008 cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM;
1015 clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; 1009 clazz = &CFF_CMAP_ENCODING_CLASS_REC_GET;
1016 } 1010 }
1017 1011
1018 error = FT_CMap_New( clazz, NULL, &cmaprec, NULL ); 1012 error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
1019 } 1013 }
1020 } 1014 }
1021 } 1015 }
1022 1016
1023 Exit: 1017 Exit:
1024 return error; 1018 return error;
1025 } 1019 }
(...skipping 23 matching lines...) Expand all
1049 if ( cff ) 1043 if ( cff )
1050 { 1044 {
1051 cff_font_done( cff ); 1045 cff_font_done( cff );
1052 FT_FREE( face->extra.data ); 1046 FT_FREE( face->extra.data );
1053 } 1047 }
1054 } 1048 }
1055 } 1049 }
1056 1050
1057 1051
1058 FT_LOCAL_DEF( FT_Error ) 1052 FT_LOCAL_DEF( FT_Error )
1059 cff_driver_init( FT_Module module ) 1053 cff_driver_init( FT_Module module ) /* CFF_Driver */
1060 { 1054 {
1061 FT_UNUSED( module ); 1055 CFF_Driver driver = (CFF_Driver)module;
1062 1056
1063 return CFF_Err_Ok; 1057
1058 /* set default property values */
1059 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
1060 driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
1061 #else
1062 driver->hinting_engine = FT_CFF_HINTING_ADOBE;
1063 #endif
1064 driver->no_stem_darkening = FALSE;
1065
1066 return FT_Err_Ok;
1064 } 1067 }
1065 1068
1066 1069
1067 FT_LOCAL_DEF( void ) 1070 FT_LOCAL_DEF( void )
1068 cff_driver_done( FT_Module module ) 1071 cff_driver_done( FT_Module module ) /* CFF_Driver */
1069 { 1072 {
1070 FT_UNUSED( module ); 1073 FT_UNUSED( module );
1071 } 1074 }
1072 1075
1073 1076
1074 /* END */ 1077 /* END */
OLDNEW
« no previous file with comments | « src/cff/cffobjs.h ('k') | src/cff/cffparse.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698