From f0d96a261904400300df1d7102b40161ad226bd8 Mon Sep 17 00:00:00 2001 From: Dave Belanger Date: Sat, 4 Oct 2003 04:00:08 +0000 Subject: [PATCH] Face families are in the top 4 bits of lfPitchAndFamily, so mask with 0xF0 before testing. --- dlls/gdi/freetype.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c index d4d381247cf..11a0c5217c8 100644 --- a/dlls/gdi/freetype.c +++ b/dlls/gdi/freetype.c @@ -1162,12 +1162,16 @@ not_found: } else 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); - else if(lf.lfPitchAndFamily & FF_ROMAN) + else if((lf.lfPitchAndFamily & 0xF0) == FF_ROMAN) strcpyW(lf.lfFaceName, defSerif); - else if(lf.lfPitchAndFamily & FF_SWISS) + else if((lf.lfPitchAndFamily & 0xF0) == FF_SWISS) strcpyW(lf.lfFaceName, defSans); else strcpyW(lf.lfFaceName, defSans);