| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |