gdi32: Use single get_cptable implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6857cb5695
commit
9c9f229486
|
@ -3208,7 +3208,7 @@ static UINT get_glyph_index_symbol( struct gdi_font *font, UINT glyph )
|
|||
return index;
|
||||
}
|
||||
|
||||
static CPTABLEINFO *get_cptable( WORD cp )
|
||||
CPTABLEINFO *get_cptable( WORD cp )
|
||||
{
|
||||
static CPTABLEINFO tables[100];
|
||||
unsigned int i;
|
||||
|
|
|
@ -730,21 +730,6 @@ static const LANGID mac_langid_table[] =
|
|||
MAKELANGID(LANG_AZERI,SUBLANG_AZERI_LATIN), /* TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT */
|
||||
};
|
||||
|
||||
static CPTABLEINFO *get_cptable( WORD cp )
|
||||
{
|
||||
static CPTABLEINFO tables[100];
|
||||
unsigned int i;
|
||||
USHORT *ptr;
|
||||
SIZE_T size;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tables) && tables[i].CodePage; i++)
|
||||
if (tables[i].CodePage == cp) return &tables[i];
|
||||
if (NtGetNlsSectionPtr( 11, cp, NULL, (void **)&ptr, &size )) return NULL;
|
||||
if (i == ARRAY_SIZE(tables)) ERR( "too many code pages\n" );
|
||||
RtlInitCodePageTable( ptr, &tables[i] );
|
||||
return &tables[i];
|
||||
}
|
||||
|
||||
static CPTABLEINFO *get_mac_code_page( const FT_SfntName *name )
|
||||
{
|
||||
int id = name->encoding_id;
|
||||
|
|
|
@ -334,6 +334,7 @@ extern int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name,
|
|||
const struct bitmap_font_size *size ) DECLSPEC_HIDDEN;
|
||||
extern UINT font_init(void) DECLSPEC_HIDDEN;
|
||||
extern UINT get_acp(void) DECLSPEC_HIDDEN;
|
||||
extern CPTABLEINFO *get_cptable( WORD cp ) DECLSPEC_HIDDEN;
|
||||
extern const struct font_backend_funcs *init_freetype_lib(void) DECLSPEC_HIDDEN;
|
||||
|
||||
/* opentype.c */
|
||||
|
|
Loading…
Reference in New Issue