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

Side by Side Diff: third_party/freetype/src/psaux/t1cmap.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
« no previous file with comments | « third_party/freetype/src/psaux/t1cmap.h ('k') | third_party/freetype/src/psaux/t1decode.h » ('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 /* t1cmap.c */ 3 /* t1cmap.c */
4 /* */ 4 /* */
5 /* Type 1 character map support (body). */ 5 /* Type 1 character map support (body). */
6 /* */ 6 /* */
7 /* Copyright 2002, 2003, 2006, 2007, 2012 by */ 7 /* Copyright 2002-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
(...skipping 14 matching lines...) Expand all
32 /*************************************************************************/ 32 /*************************************************************************/
33 33
34 static void 34 static void
35 t1_cmap_std_init( T1_CMapStd cmap, 35 t1_cmap_std_init( T1_CMapStd cmap,
36 FT_Int is_expert ) 36 FT_Int is_expert )
37 { 37 {
38 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap ); 38 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
39 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames; 39 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
40 40
41 41
42 cmap->num_glyphs = face->type1.num_glyphs; 42 cmap->num_glyphs = (FT_UInt)face->type1.num_glyphs;
43 cmap->glyph_names = (const char* const*)face->type1.glyph_names; 43 cmap->glyph_names = (const char* const*)face->type1.glyph_names;
44 cmap->sid_to_string = psnames->adobe_std_strings; 44 cmap->sid_to_string = psnames->adobe_std_strings;
45 cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding 45 cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding
46 : psnames->adobe_std_encoding; 46 : psnames->adobe_std_encoding;
47 47
48 FT_ASSERT( cmap->code_to_sid != NULL ); 48 FT_ASSERT( cmap->code_to_sid != NULL );
49 } 49 }
50 50
51 51
52 FT_CALLBACK_DEF( void ) 52 FT_CALLBACK_DEF( void )
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 FT_CALLBACK_DEF( FT_Error ) 182 FT_CALLBACK_DEF( FT_Error )
183 t1_cmap_custom_init( T1_CMapCustom cmap, 183 t1_cmap_custom_init( T1_CMapCustom cmap,
184 FT_Pointer pointer ) 184 FT_Pointer pointer )
185 { 185 {
186 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap ); 186 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
187 T1_Encoding encoding = &face->type1.encoding; 187 T1_Encoding encoding = &face->type1.encoding;
188 188
189 FT_UNUSED( pointer ); 189 FT_UNUSED( pointer );
190 190
191 191
192 cmap->first = encoding->code_first; 192 cmap->first = (FT_UInt)encoding->code_first;
193 cmap->count = (FT_UInt)( encoding->code_last - cmap->first ); 193 cmap->count = (FT_UInt)encoding->code_last - cmap->first;
194 cmap->indices = encoding->char_index; 194 cmap->indices = encoding->char_index;
195 195
196 FT_ASSERT( cmap->indices != NULL ); 196 FT_ASSERT( cmap->indices != NULL );
197 FT_ASSERT( encoding->code_first <= encoding->code_last ); 197 FT_ASSERT( encoding->code_first <= encoding->code_last );
198 198
199 return 0; 199 return 0;
200 } 200 }
201 201
202 202
203 FT_CALLBACK_DEF( void ) 203 FT_CALLBACK_DEF( void )
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 { 288 {
289 T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes ); 289 T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
290 FT_Memory memory = FT_FACE_MEMORY( face ); 290 FT_Memory memory = FT_FACE_MEMORY( face );
291 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames; 291 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
292 292
293 FT_UNUSED( pointer ); 293 FT_UNUSED( pointer );
294 294
295 295
296 return psnames->unicodes_init( memory, 296 return psnames->unicodes_init( memory,
297 unicodes, 297 unicodes,
298 face->type1.num_glyphs, 298 (FT_UInt)face->type1.num_glyphs,
299 (PS_GetGlyphNameFunc)&psaux_get_glyph_name, 299 (PS_GetGlyphNameFunc)&psaux_get_glyph_name,
300 (PS_FreeGlyphNameFunc)NULL, 300 (PS_FreeGlyphNameFunc)NULL,
301 (FT_Pointer)face ); 301 (FT_Pointer)face );
302 } 302 }
303 303
304 304
305 FT_CALLBACK_DEF( void ) 305 FT_CALLBACK_DEF( void )
306 t1_cmap_unicode_done( PS_Unicodes unicodes ) 306 t1_cmap_unicode_done( PS_Unicodes unicodes )
307 { 307 {
308 FT_Face face = FT_CMAP_FACE( unicodes ); 308 FT_Face face = FT_CMAP_FACE( unicodes );
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 (FT_CMap_InitFunc) t1_cmap_unicode_init, 346 (FT_CMap_InitFunc) t1_cmap_unicode_init,
347 (FT_CMap_DoneFunc) t1_cmap_unicode_done, 347 (FT_CMap_DoneFunc) t1_cmap_unicode_done,
348 (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index, 348 (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,
349 (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next, 349 (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,
350 350
351 NULL, NULL, NULL, NULL, NULL 351 NULL, NULL, NULL, NULL, NULL
352 }; 352 };
353 353
354 354
355 /* END */ 355 /* END */
OLDNEW
« no previous file with comments | « third_party/freetype/src/psaux/t1cmap.h ('k') | third_party/freetype/src/psaux/t1decode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698