Commit 9c9f2294 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use single get_cptable implementation.

parent 6857cb56
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment