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

Function GetFontCacheFontSize

src/fontcache.cpp:167–171  ·  view source on GitHub ↗

* Get the scalable font size to use for a FontSize. * @param fs FontSize to get the scalable font size for. * @return Scalable font size to use. */

Source from the content-addressed store, hash-verified

165 * @return Scalable font size to use.
166 */
167uint GetFontCacheFontSize(FontSize fs)
168{
169 const FontCacheSubSetting &setting = *GetFontCacheSubSetting(fs);
170 return IsDefaultFont(setting) ? FontCache::GetDefaultFontHeight(fs) : setting.size;
171}
172
173#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA)
174/**

Callers 3

LoadFontMethod · 0.85
LoadFontMethod · 0.85
LoadFontMethod · 0.85

Calls 2

GetFontCacheSubSettingFunction · 0.85
IsDefaultFontFunction · 0.85

Tested by

no test coverage detected