If lfFaceName == "", then we patch up the names according to

lfPitchAndFamily.  This is not very pretty I'm afraid...
This commit is contained in:
Huw D M Davies 2002-04-03 22:09:58 +00:00 committed by Alexandre Julliard
parent 5b01b50631
commit c2c8bf1bdd
1 changed files with 24 additions and 1 deletions

View File

@ -2618,6 +2618,29 @@ static void XFONT_MatchDeviceFont( fontResource* start, fontMatch* pfm)
pfm->plf->lfWeight, (pfm->plf->lfItalic) ? "Italic" : "" );
pfm->pfi = NULL;
if( !fm.plf->lfFaceName[0] )
{
switch(fm.plf->lfPitchAndFamily & 0xf0)
{
case FF_MODERN:
strcpy(fm.plf->lfFaceName, "Courier New");
break;
case FF_ROMAN:
strcpy(fm.plf->lfFaceName, "Times New Roman");
break;
case FF_SWISS:
strcpy(fm.plf->lfFaceName, "Arial");
break;
default:
if((fm.plf->lfPitchAndFamily & 0x0f) == FIXED_PITCH)
strcpy(fm.plf->lfFaceName, "Courier New");
else
strcpy(fm.plf->lfFaceName, "Arial");
break;
}
}
if( fm.plf->lfFaceName[0] )
{
fm.pfr = XFONT_FindFIList( start, fm.plf->lfFaceName);