Face families are in the top 4 bits of lfPitchAndFamily, so mask with

0xF0 before testing.
This commit is contained in:
Dave Belanger 2003-10-04 04:00:08 +00:00 committed by Alexandre Julliard
parent 16c62e645c
commit f0d96a2619
1 changed files with 8 additions and 4 deletions

View File

@ -1162,12 +1162,16 @@ not_found:
} else } else
lf.lfCharSet = csi.ciCharset; lf.lfCharSet = csi.ciCharset;
} }
if(lf.lfPitchAndFamily & FIXED_PITCH ||
lf.lfPitchAndFamily & FF_MODERN) /* Face families are in the top 4 bits of lfPitchAndFamily,
so mask with 0xF0 before testing */
if((lf.lfPitchAndFamily & FIXED_PITCH) ||
(lf.lfPitchAndFamily & 0xF0) == FF_MODERN)
strcpyW(lf.lfFaceName, defFixed); strcpyW(lf.lfFaceName, defFixed);
else if(lf.lfPitchAndFamily & FF_ROMAN) else if((lf.lfPitchAndFamily & 0xF0) == FF_ROMAN)
strcpyW(lf.lfFaceName, defSerif); strcpyW(lf.lfFaceName, defSerif);
else if(lf.lfPitchAndFamily & FF_SWISS) else if((lf.lfPitchAndFamily & 0xF0) == FF_SWISS)
strcpyW(lf.lfFaceName, defSans); strcpyW(lf.lfFaceName, defSans);
else else
strcpyW(lf.lfFaceName, defSans); strcpyW(lf.lfFaceName, defSans);