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

Method GetGlyph

src/fontcache/spritefontcache.cpp:130–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130const Sprite *SpriteFontCache::GetGlyph(GlyphID key)
131{
132 SpriteID sprite = static_cast<SpriteID>(key & ~SPRITE_GLYPH);
133 if (sprite == 0) sprite = GetUnicodeGlyph(this->fs, '?');
134 return GetSprite(sprite, SpriteType::Font);
135}
136
137uint SpriteFontCache::GetGlyphWidth(GlyphID key)
138{

Callers 2

DrawLayoutLineFunction · 0.45
GetGlyphFunction · 0.45

Calls 2

GetUnicodeGlyphFunction · 0.85
GetSpriteFunction · 0.85

Tested by

no test coverage detected