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

Side by Side Diff: core/src/fxge/fx_freetype/fxft2.5.01/src/psnames/fxft_psmodule.c

Issue 801913002: Simplify PDFium by removing code that's not used in the open source repo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
OLDNEW
1 #if !defined(_FXFT_VERSION_) || _FXFT_VERSION_ == 2501 1 #if !defined(_FXFT_VERSION_) || _FXFT_VERSION_ == 2501
2 /***************************************************************************/ 2 /***************************************************************************/
3 /* */ 3 /* */
4 /* psmodule.c */ 4 /* psmodule.c */
5 /* */ 5 /* */
6 /* PSNames module implementation (body). */ 6 /* PSNames module implementation (body). */
7 /* */ 7 /* */
8 /* Copyright 1996-2003, 2005-2008, 2012, 2013 by */ 8 /* Copyright 1996-2003, 2005-2008, 2012, 2013 by */
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* */ 10 /* */
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return (FT_UInt32)ft_get_adobe_glyph_index( glyph_name, p ); 161 return (FT_UInt32)ft_get_adobe_glyph_index( glyph_name, p );
162 else 162 else
163 return (FT_UInt32)( ft_get_adobe_glyph_index( glyph_name, dot ) | 163 return (FT_UInt32)( ft_get_adobe_glyph_index( glyph_name, dot ) |
164 VARIANT_BIT ); 164 VARIANT_BIT );
165 } 165 }
166 } 166 }
167 #ifdef __cplusplus 167 #ifdef __cplusplus
168 } 168 }
169 #endif 169 #endif
170 170
171 #if !defined(_FPDFAPI_MINI_) || defined(_FXCORE_FEATURE_ALL_)
172 static int xyq_search_node(char* glyph_name, int name_offset, int table_offset, FT_UInt32 unicode) 171 static int xyq_search_node(char* glyph_name, int name_offset, int table_offset, FT_UInt32 unicode)
173 { 172 {
174 int i, count; 173 int i, count;
175 174
176 // copy letters 175 // copy letters
177 while (1) { 176 while (1) {
178 glyph_name[name_offset] = ft_adobe_glyph_list[table_offset] & 0x 7f; 177 glyph_name[name_offset] = ft_adobe_glyph_list[table_offset] & 0x 7f;
179 name_offset ++; 178 name_offset ++;
180 table_offset ++; 179 table_offset ++;
181 if (!(ft_adobe_glyph_list[table_offset-1] & 0x80)) break; 180 if (!(ft_adobe_glyph_list[table_offset-1] & 0x80)) break;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 count = ft_adobe_glyph_list[1]; 213 count = ft_adobe_glyph_list[1];
215 for (i = 0; i < count; i ++) { 214 for (i = 0; i < count; i ++) {
216 int child_offset = ft_adobe_glyph_list[i*2+2] * 256 + ft_adobe_g lyph_list[i*2+3]; 215 int child_offset = ft_adobe_glyph_list[i*2+2] * 256 + ft_adobe_g lyph_list[i*2+3];
217 if (xyq_search_node(glyph_name, 0, child_offset, unicode)) 216 if (xyq_search_node(glyph_name, 0, child_offset, unicode))
218 return; 217 return;
219 } 218 }
220 219
221 // failed, clear the buffer 220 // failed, clear the buffer
222 glyph_name[0] = 0; 221 glyph_name[0] = 0;
223 } 222 }
224 #endif
225 223
226 /* ft_qsort callback to sort the unicode map */ 224 /* ft_qsort callback to sort the unicode map */
227 FT_CALLBACK_DEF( int ) 225 FT_CALLBACK_DEF( int )
228 compare_uni_maps( const void* a, 226 compare_uni_maps( const void* a,
229 const void* b ) 227 const void* b )
230 { 228 {
231 PS_UniMap* map1 = (PS_UniMap*)a; 229 PS_UniMap* map1 = (PS_UniMap*)a;
232 PS_UniMap* map2 = (PS_UniMap*)b; 230 PS_UniMap* map2 = (PS_UniMap*)b;
233 FT_UInt32 unicode1 = BASE_GLYPH( map1->unicode ); 231 FT_UInt32 unicode1 = BASE_GLYPH( map1->unicode );
234 FT_UInt32 unicode2 = BASE_GLYPH( map2->unicode ); 232 FT_UInt32 unicode2 = BASE_GLYPH( map2->unicode );
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 PUT_PS_NAMES_SERVICE( 659 PUT_PS_NAMES_SERVICE(
662 (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */ 660 (void*)&PSCMAPS_INTERFACE_GET ), /* module specific interface */
663 (FT_Module_Constructor)NULL, 661 (FT_Module_Constructor)NULL,
664 (FT_Module_Destructor) NULL, 662 (FT_Module_Destructor) NULL,
665 (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) ) 663 (FT_Module_Requester) PUT_PS_NAMES_SERVICE( psnames_get_service ) )
666 664
667 665
668 /* END */ 666 /* END */
669 #endif 667 #endif
670 668
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698