38#define DEFINE_PS_TABLES
39#define DEFINE_PS_TABLES_DATA
45#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
48#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
51#define VARIANT_BIT 0x80000000UL
52#define BASE_GLYPH( code ) ( (FT_UInt32)( (code) & ~VARIANT_BIT ) )
61 ps_unicode_value(
const char* glyph_name )
65 if ( glyph_name[0] ==
'u' &&
66 glyph_name[1] ==
'n' &&
67 glyph_name[2] ==
'i' )
77 const char*
p = glyph_name + 3;
86 d = (
unsigned char)
c -
'0';
89 d = (
unsigned char)
c -
'A';
111 return (FT_UInt32)(
value | VARIANT_BIT );
117 if ( glyph_name[0] ==
'u' )
121 const char*
p = glyph_name + 1;
130 d = (
unsigned char)
c -
'0';
133 d = (
unsigned char)
c -
'A';
151 return (FT_UInt32)(
value | VARIANT_BIT );
158 const char*
p = glyph_name;
159 const char* dot =
NULL;
164 if ( *
p ==
'.' &&
p > glyph_name )
173 return (FT_UInt32)ft_get_adobe_glyph_index( glyph_name,
p );
175 return (FT_UInt32)( ft_get_adobe_glyph_index( glyph_name, dot ) |
183 compare_uni_maps(
const void*
a,
188 FT_UInt32 unicode1 = BASE_GLYPH( map1->
unicode );
189 FT_UInt32 unicode2 = BASE_GLYPH( map2->
unicode );
193 if ( unicode1 == unicode2 )
204 if ( unicode1 > unicode2 )
206 else if ( unicode1 < unicode2 )
217#define EXTRA_GLYPH_LIST_SIZE 10
219 static const FT_UInt32 ft_extra_glyph_unicodes[EXTRA_GLYPH_LIST_SIZE] =
235 static const char ft_extra_glyph_names[] =
237 'D',
'e',
'l',
't',
'a',0,
238 'O',
'm',
'e',
'g',
'a',0,
239 'f',
'r',
'a',
'c',
't',
'i',
'o',
'n',0,
240 'h',
'y',
'p',
'h',
'e',
'n',0,
241 'm',
'a',
'c',
'r',
'o',
'n',0,
243 'p',
'e',
'r',
'i',
'o',
'd',
'c',
'e',
'n',
't',
'e',
'r',
'e',
'd',0,
244 's',
'p',
'a',
'c',
'e',0,
245 'T',
'c',
'o',
'm',
'm',
'a',
'a',
'c',
'c',
'e',
'n',
't',0,
246 't',
'c',
'o',
'm',
'm',
'a',
'a',
'c',
'c',
'e',
'n',
't',0
250 ft_extra_glyph_name_offsets[EXTRA_GLYPH_LIST_SIZE] =
266 ps_check_extra_glyph_name(
const char* gname,
274 for (
n = 0;
n < EXTRA_GLYPH_LIST_SIZE;
n++ )
277 ft_extra_glyph_name_offsets[
n], gname ) == 0 )
279 if ( states[
n] == 0 )
283 extra_glyphs[
n] = glyph;
293 ps_check_extra_glyph_unicode( FT_UInt32 uni_char,
299 for (
n = 0;
n < EXTRA_GLYPH_LIST_SIZE;
n++ )
301 if ( uni_char == ft_extra_glyph_unicodes[
n] )
323 FT_UInt extra_glyph_list_states[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
324 FT_UInt extra_glyphs[EXTRA_GLYPH_LIST_SIZE];
341 for (
n = 0;
n < num_glyphs;
n++ )
343 const char* gname = get_glyph_name( glyph_data,
n );
348 ps_check_extra_glyph_name( gname,
n,
349 extra_glyphs, extra_glyph_list_states );
350 uni_char = ps_unicode_value( gname );
352 if ( BASE_GLYPH( uni_char ) != 0 )
354 ps_check_extra_glyph_unicode( uni_char,
355 extra_glyph_list_states );
356 map->unicode = uni_char;
357 map->glyph_index =
n;
361 if ( free_glyph_name )
362 free_glyph_name( glyph_data, gname );
366 for (
n = 0;
n < EXTRA_GLYPH_LIST_SIZE;
n++ )
368 if ( extra_glyph_list_states[
n] == 1 )
373 map->unicode = ft_extra_glyph_unicodes[
n];
374 map->glyph_index = extra_glyphs[
n];
392 if (
count < num_glyphs / 2 )
395 num_glyphs + EXTRA_GLYPH_LIST_SIZE,
427 FT_UInt32 base_glyph;
438 base_glyph = BASE_GLYPH( mid->
unicode );
440 if ( base_glyph == unicode )
446 if ( base_glyph < unicode )
464 FT_UInt32 char_code = *unicode + 1;
472 FT_UInt32 base_glyph;
480 if (
map->unicode == char_code )
486 base_glyph = BASE_GLYPH(
map->unicode );
488 if ( base_glyph == char_code )
491 if ( base_glyph < char_code )
503 if ( min < table->num_maps )
507 char_code = BASE_GLYPH(
map->unicode );
512 *unicode = char_code;
521 ps_get_macintosh_name(
FT_UInt name_index )
540#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
585 const char* service_id )
595#ifndef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
596#define PUT_PS_NAMES_SERVICE( a ) NULL
598#define PUT_PS_NAMES_SERVICE( a ) a
602 psnames_module_class,
612 (
void*)&pscmaps_interface ),
#define FT_CALLBACK_DEF(x)
#define FT_NEW_ARRAY(ptr, count)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
void(* FT_Module_Destructor)(FT_Module module)
FT_Error(* FT_Module_Constructor)(FT_Module module)
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
#define FT_DEFINE_MODULE( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLuint GLuint GLsizei count
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
static char memory[1024 *256]
#define PUT_PS_NAMES_SERVICE(a)
const char ft_standard_glyph_names[3696]
const short ft_sid_names[FT_NUM_SID_NAMES]
const unsigned short t1_expert_encoding[256]
const unsigned short t1_standard_encoding[256]
const short ft_mac_names[FT_NUM_MAC_NAMES]
const char *(* PS_Macintosh_NameFunc)(FT_UInt name_index)
const char *(* PS_GetGlyphNameFunc)(FT_Pointer data, FT_UInt string_index)
const char *(* PS_Adobe_Std_StringsFunc)(FT_UInt string_index)
FT_UInt32(* PS_Unicode_ValueFunc)(const char *glyph_name)
FT_UInt32(* PS_Unicodes_CharNextFunc)(PS_Unicodes unicodes, FT_UInt32 *unicode)
FT_Error(* PS_Unicodes_InitFunc)(FT_Memory memory, PS_Unicodes unicodes, FT_UInt num_glyphs, PS_GetGlyphNameFunc get_glyph_name, PS_FreeGlyphNameFunc free_glyph_name, FT_Pointer glyph_data)
#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, unicodes_char_index_, unicodes_char_next_, macintosh_name_, adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_)
void(* PS_FreeGlyphNameFunc)(FT_Pointer data, const char *name)
#define FT_SERVICE_ID_POSTSCRIPT_CMAPS
FT_UInt(* PS_Unicodes_CharIndexFunc)(PS_Unicodes unicodes, FT_UInt32 unicode)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList