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

Function GetCharacterHeight

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

* Get height of a character for a given font size. * @param size Font size to get height of * @return Height of characters in the given font (pixels) */

Source from the content-addressed store, hash-verified

85 * @return Height of characters in the given font (pixels)
86 */
87int GetCharacterHeight(FontSize size)
88{
89 return FontCache::Get(size)->GetHeight();
90}
91
92
93/* static */ std::array<std::unique_ptr<FontCache>, FS_END> FontCache::caches{};

Callers 15

UpdateWidgetSizeMethod · 0.85
DrawCargoIconMethod · 0.85
DrawWidgetMethod · 0.85
DrawSettingMethod · 0.85
DrawWidgetMethod · 0.85
UpdateWidgetSizeMethod · 0.85
DrawWidgetMethod · 0.85
DrawDetailsMethod · 0.85
UpdateWidgetSizeMethod · 0.85
DrawStringFunction · 0.85
DrawCharCenteredFunction · 0.85

Calls 1

GetHeightMethod · 0.45

Tested by

no test coverage detected