* Get font to use for a given font size. * @param fs Font size. * @return If configured, the font name to use, or the path of the default TrueType font if sprites are not preferred. */
| 209 | * @return If configured, the font name to use, or the path of the default TrueType font if sprites are not preferred. |
| 210 | */ |
| 211 | std::string GetFontCacheFontName(FontSize fs) |
| 212 | { |
| 213 | const FontCacheSubSetting *settings = GetFontCacheSubSetting(fs); |
| 214 | if (!settings->font.empty()) return settings->font; |
| 215 | if (_fcsettings.prefer_sprite) return {}; |
| 216 | return GetDefaultTruetypeFontFile(fs); |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Register a FontCache for its font size. |
no test coverage detected