File diff r24207:ca91fa5d58e1 → r24208:240daa324e1b
src/fontcache.cpp
Show inline comments
 
@@ -208,13 +208,13 @@ static const byte SHADOW_COLOUR = 2;
 
/** Font cache for fonts that are based on a TrueType font. */
 
class TrueTypeFontCache : public FontCache {
 
protected:
 
	int req_size;  ///< Requested font size.
 
	int used_size; ///< Used font size.
 

	
 
	typedef SmallMap<uint32, SmallPair<size_t, const void*> > FontTable; ///< Table with font table cache
 
	typedef SmallMap<uint32, std::pair<size_t, const void*> > FontTable; ///< Table with font table cache
 
	FontTable font_tables; ///< Cached font tables.
 

	
 
	/** Container for information about a glyph. */
 
	struct GlyphEntry {
 
		Sprite *sprite; ///< The loaded sprite.
 
		byte width;     ///< The width of the glyph.
 
@@ -431,13 +431,13 @@ const void *TrueTypeFontCache::GetFontTa
 
		length = iter->second.first;
 
		return iter->second.second;
 
	}
 

	
 
	const void *result = this->InternalGetFontTable(tag, length);
 

	
 
	this->font_tables.Insert(tag, SmallPair<size_t, const void *>(length, result));
 
	this->font_tables.Insert(tag, std::pair<size_t, const void *>(length, result));
 
	return result;
 
}
 

	
 

	
 
#ifdef WITH_FREETYPE
 
#include <ft2build.h>