Use hard-coded font name bindings only with the ANSI_CHARSET (non-US
charsets with no font name shouldn't be bound to US charset).
This commit is contained in:
parent
a781a31922
commit
6aadb22bfb
|
@ -2601,6 +2601,17 @@ static UINT XFONT_MatchFIList( fontMatch* pfm )
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* XFONT_is_ansi_charset
|
||||||
|
*
|
||||||
|
* returns TRUE if the given charset is ANSI_CHARSET.
|
||||||
|
*/
|
||||||
|
static BOOL XFONT_is_ansi_charset( UINT charset )
|
||||||
|
{
|
||||||
|
return ((charset == ANSI_CHARSET) ||
|
||||||
|
(charset == DEFAULT_CHARSET && GetACP() == 1252));
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* XFONT_MatchDeviceFont
|
* XFONT_MatchDeviceFont
|
||||||
*
|
*
|
||||||
|
@ -2619,7 +2630,9 @@ static void XFONT_MatchDeviceFont( fontResource* start, fontMatch* pfm)
|
||||||
|
|
||||||
pfm->pfi = NULL;
|
pfm->pfi = NULL;
|
||||||
|
|
||||||
if( !fm.plf->lfFaceName[0] )
|
/* the following hard-coded font binding assumes 'ANSI_CHARSET'. */
|
||||||
|
if( !fm.plf->lfFaceName[0] &&
|
||||||
|
XFONT_is_ansi_charset(fm.plf->lfCharSet) )
|
||||||
{
|
{
|
||||||
switch(fm.plf->lfPitchAndFamily & 0xf0)
|
switch(fm.plf->lfPitchAndFamily & 0xf0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue