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

Side by Side Diff: third_party/freetype/src/psaux/t1cmap.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 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 | « 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, 2003, 2006, 2007, 2012 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 "t1cmap.h" 19 #include "t1cmap.h"
20 20
21 #include "../../include/freetype/internal/ftdebug.h" 21 #include FT_INTERNAL_DEBUG_H
22 22
23 #include "psauxerr.h" 23 #include "psauxerr.h"
24 24
25 25
26 /*************************************************************************/ 26 /*************************************************************************/
27 /*************************************************************************/ 27 /*************************************************************************/
28 /***** *****/ 28 /***** *****/
29 /***** TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS *****/ 29 /***** TYPE1 STANDARD (AND EXPERT) ENCODING CMAPS *****/
30 /***** *****/ 30 /***** *****/
31 /*************************************************************************/ 31 /*************************************************************************/
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 char_code = 0; 114 char_code = 0;
115 115
116 Exit: 116 Exit:
117 *pchar_code = char_code; 117 *pchar_code = char_code;
118 return result; 118 return result;
119 } 119 }
120 120
121 121
122 FT_CALLBACK_DEF( FT_Error ) 122 FT_CALLBACK_DEF( FT_Error )
123 t1_cmap_standard_init( T1_CMapStd cmap ) 123 t1_cmap_standard_init( T1_CMapStd cmap,
124 FT_Pointer pointer )
124 { 125 {
126 FT_UNUSED( pointer );
127
128
125 t1_cmap_std_init( cmap, 0 ); 129 t1_cmap_std_init( cmap, 0 );
126 return 0; 130 return 0;
127 } 131 }
128 132
129 133
130 FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec 134 FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
131 t1_cmap_standard_class_rec = 135 t1_cmap_standard_class_rec =
132 { 136 {
133 sizeof ( T1_CMapStdRec ), 137 sizeof ( T1_CMapStdRec ),
134 138
135 (FT_CMap_InitFunc) t1_cmap_standard_init, 139 (FT_CMap_InitFunc) t1_cmap_standard_init,
136 (FT_CMap_DoneFunc) t1_cmap_std_done, 140 (FT_CMap_DoneFunc) t1_cmap_std_done,
137 (FT_CMap_CharIndexFunc)t1_cmap_std_char_index, 141 (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
138 (FT_CMap_CharNextFunc) t1_cmap_std_char_next, 142 (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
139 143
140 NULL, NULL, NULL, NULL, NULL 144 NULL, NULL, NULL, NULL, NULL
141 }; 145 };
142 146
143 147
144 FT_CALLBACK_DEF( FT_Error ) 148 FT_CALLBACK_DEF( FT_Error )
145 t1_cmap_expert_init( T1_CMapStd cmap ) 149 t1_cmap_expert_init( T1_CMapStd cmap,
150 FT_Pointer pointer )
146 { 151 {
152 FT_UNUSED( pointer );
153
154
147 t1_cmap_std_init( cmap, 1 ); 155 t1_cmap_std_init( cmap, 1 );
148 return 0; 156 return 0;
149 } 157 }
150 158
151 FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec 159 FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec
152 t1_cmap_expert_class_rec = 160 t1_cmap_expert_class_rec =
153 { 161 {
154 sizeof ( T1_CMapStdRec ), 162 sizeof ( T1_CMapStdRec ),
155 163
156 (FT_CMap_InitFunc) t1_cmap_expert_init, 164 (FT_CMap_InitFunc) t1_cmap_expert_init,
157 (FT_CMap_DoneFunc) t1_cmap_std_done, 165 (FT_CMap_DoneFunc) t1_cmap_std_done,
158 (FT_CMap_CharIndexFunc)t1_cmap_std_char_index, 166 (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
159 (FT_CMap_CharNextFunc) t1_cmap_std_char_next, 167 (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
160 168
161 NULL, NULL, NULL, NULL, NULL 169 NULL, NULL, NULL, NULL, NULL
162 }; 170 };
163 171
164 172
165 /*************************************************************************/ 173 /*************************************************************************/
166 /*************************************************************************/ 174 /*************************************************************************/
167 /***** *****/ 175 /***** *****/
168 /***** TYPE1 CUSTOM ENCODING CMAP *****/ 176 /***** TYPE1 CUSTOM ENCODING CMAP *****/
169 /***** *****/ 177 /***** *****/
170 /*************************************************************************/ 178 /*************************************************************************/
171 /*************************************************************************/ 179 /*************************************************************************/
172 180
173 181
174 FT_CALLBACK_DEF( FT_Error ) 182 FT_CALLBACK_DEF( FT_Error )
175 t1_cmap_custom_init( T1_CMapCustom cmap ) 183 t1_cmap_custom_init( T1_CMapCustom cmap,
184 FT_Pointer pointer )
176 { 185 {
177 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap ); 186 T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
178 T1_Encoding encoding = &face->type1.encoding; 187 T1_Encoding encoding = &face->type1.encoding;
179 188
189 FT_UNUSED( pointer );
190
180 191
181 cmap->first = encoding->code_first; 192 cmap->first = encoding->code_first;
182 cmap->count = (FT_UInt)( encoding->code_last - cmap->first ); 193 cmap->count = (FT_UInt)( encoding->code_last - cmap->first );
183 cmap->indices = encoding->char_index; 194 cmap->indices = encoding->char_index;
184 195
185 FT_ASSERT( cmap->indices != NULL ); 196 FT_ASSERT( cmap->indices != NULL );
186 FT_ASSERT( encoding->code_first <= encoding->code_last ); 197 FT_ASSERT( encoding->code_first <= encoding->code_last );
187 198
188 return 0; 199 return 0;
189 } 200 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 276
266 FT_CALLBACK_DEF( const char * ) 277 FT_CALLBACK_DEF( const char * )
267 psaux_get_glyph_name( T1_Face face, 278 psaux_get_glyph_name( T1_Face face,
268 FT_UInt idx ) 279 FT_UInt idx )
269 { 280 {
270 return face->type1.glyph_names[idx]; 281 return face->type1.glyph_names[idx];
271 } 282 }
272 283
273 284
274 FT_CALLBACK_DEF( FT_Error ) 285 FT_CALLBACK_DEF( FT_Error )
275 t1_cmap_unicode_init( PS_Unicodes unicodes ) 286 t1_cmap_unicode_init( PS_Unicodes unicodes,
287 FT_Pointer pointer )
276 { 288 {
277 T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes ); 289 T1_Face face = (T1_Face)FT_CMAP_FACE( unicodes );
278 FT_Memory memory = FT_FACE_MEMORY( face ); 290 FT_Memory memory = FT_FACE_MEMORY( face );
279 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames; 291 FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
280 292
293 FT_UNUSED( pointer );
294
281 295
282 return psnames->unicodes_init( memory, 296 return psnames->unicodes_init( memory,
283 unicodes, 297 unicodes,
284 face->type1.num_glyphs, 298 face->type1.num_glyphs,
285 (PS_GetGlyphNameFunc)&psaux_get_glyph_name, 299 (PS_GetGlyphNameFunc)&psaux_get_glyph_name,
286 (PS_FreeGlyphNameFunc)NULL, 300 (PS_FreeGlyphNameFunc)NULL,
287 (FT_Pointer)face ); 301 (FT_Pointer)face );
288 } 302 }
289 303
290 304
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 (FT_CMap_InitFunc) t1_cmap_unicode_init, 346 (FT_CMap_InitFunc) t1_cmap_unicode_init,
333 (FT_CMap_DoneFunc) t1_cmap_unicode_done, 347 (FT_CMap_DoneFunc) t1_cmap_unicode_done,
334 (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index, 348 (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,
335 (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next, 349 (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,
336 350
337 NULL, NULL, NULL, NULL, NULL 351 NULL, NULL, NULL, NULL, NULL
338 }; 352 };
339 353
340 354
341 /* 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