Changeset - r18527:7b543037b48e
[Not reviewed]
master
0 1 0
glx - 13 years ago 2011-11-30 20:17:27
glx@openttd.org
(svn r23381) -Fix (r23380): win9x compilation
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/fontcache.cpp
Show inline comments
 
@@ -342,25 +342,25 @@ public:
 
struct EFCParam {
 
	FreeTypeSettings *settings;
 
	LOCALESIGNATURE  locale;
 
	MissingGlyphSearcher *callback;
 
	FontList fonts;
 
};
 

	
 
static int CALLBACK EnumFontCallback(const ENUMLOGFONTEX *logfont, const NEWTEXTMETRICEX *metric, DWORD type, LPARAM lParam)
 
{
 
	EFCParam *info = (EFCParam *)lParam;
 

	
 
	/* Skip duplicates */
 
	if (!info->fonts.Add(logfont->elfFullName)) return 1;
 
	if (!info->fonts.Add((const TCHAR*)logfont->elfFullName)) return 1;
 
	/* Only use TrueType fonts */
 
	if (!(type & TRUETYPE_FONTTYPE)) return 1;
 
	/* Don't use SYMBOL fonts */
 
	if (logfont->elfLogFont.lfCharSet == SYMBOL_CHARSET) return 1;
 
	/* Use monospaced fonts when asked for it. */
 
	if (info->callback->Monospace() && (logfont->elfLogFont.lfPitchAndFamily & (FF_MODERN | FIXED_PITCH)) != (FF_MODERN | FIXED_PITCH)) return 1;
 

	
 
	/* The font has to have at least one of the supported locales to be usable. */
 
	if ((metric->ntmFontSig.fsCsb[0] & info->locale.lsCsbSupported[0]) == 0 && (metric->ntmFontSig.fsCsb[1] & info->locale.lsCsbSupported[1]) == 0) {
 
		/* On win9x metric->ntmFontSig seems to contain garbage. */
 
		FONTSIGNATURE fs;
 
		memset(&fs, 0, sizeof(fs));
0 comments (0 inline, 0 general)