diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index dd5e0064a5..46751c64be 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -4760,6 +4760,12 @@ GetFontPenalty(const LOGFONTW * LogFont, } } + if (TM->tmCharSet == DEFAULT_CHARSET || (Otm->otmfsSelection & 0xC0)) + { + /* UNDOCUMENTED: Candidate's charset or otmfsSelection is invalid. It smells bad. */ + GOT_PENALTY("UNDOCUMENTED:BadFont", 10000); + } + if (Penalty < 200) { DPRINT("WARNING: Penalty:%ld < 200: RequestedNameW:%ls, "