MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetGlyph

Method GetGlyph

src/fontcache/truetypefontcache.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78const Sprite *TrueTypeFontCache::GetGlyph(GlyphID key)
79{
80 if ((key & SPRITE_GLYPH) != 0) return this->parent->GetGlyph(key);
81
82 /* Check for the glyph in our cache */
83 GlyphEntry *glyph = this->GetGlyphPtr(key);
84 if (glyph != nullptr && glyph->data != nullptr) return glyph->GetSprite();
85
86 return this->InternalGetGlyph(key, GetFontAAState());
87}

Callers 1

GetGlyphWidthMethod · 0.95

Calls 4

GetGlyphPtrMethod · 0.95
GetFontAAStateFunction · 0.85
GetSpriteMethod · 0.45
InternalGetGlyphMethod · 0.45

Tested by

no test coverage detected