Commit c2c8bf1b authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

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

lfPitchAndFamily. This is not very pretty I'm afraid...
parent 5b01b506
......@@ -2618,7 +2618,30 @@ static void XFONT_MatchDeviceFont( fontResource* start, fontMatch* pfm)
pfm->plf->lfWeight, (pfm->plf->lfItalic) ? "Italic" : "" );
pfm->pfi = NULL;
if( fm.plf->lfFaceName[0] )
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);
if( fm.pfr ) /* match family */
......
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