Changeset - r18425:70f34a50f397
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-11-20 12:02:06
rubidium@openttd.org
(svn r23277) -Codechange: fallback font support for fontcache
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/fontcache.cpp
Show inline comments
 
@@ -709,7 +709,7 @@ bool SetFallbackFont(FreeTypeSettings *s
 
	/* First create a pattern to match the wanted language. */
 
	FcPattern *pat = FcNameParse((FcChar8*)lang);
 
	/* We only want to know the filename. */
 
	FcObjectSet *os = FcObjectSetBuild(FC_FILE, NULL);
 
	FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SPACING, NULL);
 
	/* Get the list of filenames matching the wanted language. */
 
	FcFontSet *fs = FcFontList(NULL, pat, os);
 

	
 
@@ -727,6 +727,10 @@ bool SetFallbackFont(FreeTypeSettings *s
 
				continue;
 
			}
 

	
 
			int value = 0;
 
			FcPatternGetInteger(font, FC_SPACING, 0, &value);
 
			if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) continue;
 

	
 
			callback->SetFontNames(settings, (const char*)file);
 

	
 
			bool missing = callback->FindMissingGlyphs(NULL);
0 comments (0 inline, 0 general)