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

Side by Side Diff: third_party/freetype/src/truetype/ttdriver.c

Issue 1413673003: Update bundled freetype to 2.6.1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: DEPS for corpus Created 5 years, 1 month 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
OLDNEW
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-2014 by */ 7 /* Copyright 1996-2015 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_FONT_FORMAT_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 32 #include FT_SERVICE_PROPERTIES_H
33 #include FT_TRUETYPE_DRIVER_H 33 #include FT_TRUETYPE_DRIVER_H
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 /**** ****/ 127 /**** ****/
128 /**** ****/ 128 /**** ****/
129 /**** F A C E S ****/ 129 /**** F A C E S ****/
130 /**** ****/ 130 /**** ****/
131 /**** ****/ 131 /**** ****/
132 /*************************************************************************/ 132 /*************************************************************************/
133 /*************************************************************************/ 133 /*************************************************************************/
134 /*************************************************************************/ 134 /*************************************************************************/
135 135
136 136
137 #undef PAIR_TAG
138 #define PAIR_TAG( left, right ) ( ( (FT_ULong)left << 16 ) | \
139 (FT_ULong)right )
140
141
142 /*************************************************************************/ 137 /*************************************************************************/
143 /* */ 138 /* */
144 /* <Function> */ 139 /* <Function> */
145 /* tt_get_kerning */ 140 /* tt_get_kerning */
146 /* */ 141 /* */
147 /* <Description> */ 142 /* <Description> */
148 /* A driver method used to return the kerning vector between two */ 143 /* A driver method used to return the kerning vector between two */
149 /* glyphs of the same face. */ 144 /* glyphs of the same face. */
150 /* */ 145 /* */
151 /* <Input> */ 146 /* <Input> */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 kerning->x = 0; 179 kerning->x = 0;
185 kerning->y = 0; 180 kerning->y = 0;
186 181
187 if ( sfnt ) 182 if ( sfnt )
188 kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph ); 183 kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );
189 184
190 return 0; 185 return 0;
191 } 186 }
192 187
193 188
194 #undef PAIR_TAG
195
196
197 static FT_Error 189 static FT_Error
198 tt_get_advances( FT_Face ttface, 190 tt_get_advances( FT_Face ttface,
199 FT_UInt start, 191 FT_UInt start,
200 FT_UInt count, 192 FT_UInt count,
201 FT_Int32 flags, 193 FT_Int32 flags,
202 FT_Fixed *advances ) 194 FT_Fixed *advances )
203 { 195 {
204 FT_UInt nn; 196 FT_UInt nn;
205 TT_Face face = (TT_Face) ttface; 197 TT_Face face = (TT_Face) ttface;
206 198
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 #endif /* TT_USE_BYTECODE_INTERPRETER */ 441 #endif /* TT_USE_BYTECODE_INTERPRETER */
450 }; 442 };
451 443
452 FT_DEFINE_SERVICE_TTGLYFREC( 444 FT_DEFINE_SERVICE_TTGLYFREC(
453 tt_service_truetype_glyf, 445 tt_service_truetype_glyf,
454 (TT_Glyf_GetLocationFunc)tt_face_get_location ) 446 (TT_Glyf_GetLocationFunc)tt_face_get_location )
455 447
456 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT 448 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
457 FT_DEFINE_SERVICEDESCREC5( 449 FT_DEFINE_SERVICEDESCREC5(
458 tt_services, 450 tt_services,
459 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, 451 FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_TRUETYPE,
460 FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET, 452 FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET,
461 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, 453 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
462 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, 454 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
463 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) 455 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
464 #else 456 #else
465 FT_DEFINE_SERVICEDESCREC4( 457 FT_DEFINE_SERVICEDESCREC4(
466 tt_services, 458 tt_services,
467 FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE, 459 FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_TRUETYPE,
468 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine, 460 FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
469 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET, 461 FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
470 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET ) 462 FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
471 #endif 463 #endif
472 464
473 465
474 FT_CALLBACK_DEF( FT_Module_Interface ) 466 FT_CALLBACK_DEF( FT_Module_Interface )
475 tt_get_interface( FT_Module driver, /* TT_Driver */ 467 tt_get_interface( FT_Module driver, /* TT_Driver */
476 const char* tt_interface ) 468 const char* tt_interface )
477 { 469 {
478 FT_Library library; 470 FT_Library library;
479 FT_Module_Interface result; 471 FT_Module_Interface result;
480 FT_Module sfntd; 472 FT_Module sfntd;
481 SFNT_Service sfnt; 473 SFNT_Service sfnt;
482 474
483 475
484 /* TT_SERVICES_GET derefers `library' in PIC mode */ 476 /* TT_SERVICES_GET dereferences `library' in PIC mode */
485 #ifdef FT_CONFIG_OPTION_PIC 477 #ifdef FT_CONFIG_OPTION_PIC
486 if ( !driver ) 478 if ( !driver )
487 return NULL; 479 return NULL;
488 library = driver->library; 480 library = driver->library;
489 if ( !library ) 481 if ( !library )
490 return NULL; 482 return NULL;
491 #endif 483 #endif
492 484
493 result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface ); 485 result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface );
494 if ( result != NULL ) 486 if ( result != NULL )
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 tt_get_kerning, 556 tt_get_kerning,
565 0, /* FT_Face_AttachFunc */ 557 0, /* FT_Face_AttachFunc */
566 tt_get_advances, 558 tt_get_advances,
567 559
568 tt_size_request, 560 tt_size_request,
569 TT_SIZE_SELECT 561 TT_SIZE_SELECT
570 ) 562 )
571 563
572 564
573 /* END */ 565 /* END */
OLDNEW
« no previous file with comments | « third_party/freetype/src/truetype/ttdriver.h ('k') | third_party/freetype/src/truetype/tterrors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698