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

Function GetDefaultTruetypeFontFile

src/fontcache.cpp:196–204  ·  view source on GitHub ↗

* Get path of default font file for a given font size. * @param fs Font size. * @return Full path of default font file. */

Source from the content-addressed store, hash-verified

194 * @return Full path of default font file.
195 */
196static std::string GetDefaultTruetypeFontFile([[maybe_unused]] FontSize fs)
197{
198#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA)
199 /* Find font file. */
200 return FioFindFullPath(BASESET_DIR, GetDefaultTruetypeFont(fs));
201#else
202 return {};
203#endif /* defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) */
204}
205
206/**
207 * Get font to use for a given font size.

Callers 1

GetFontCacheFontNameFunction · 0.85

Calls 2

FioFindFullPathFunction · 0.85
GetDefaultTruetypeFontFunction · 0.85

Tested by

no test coverage detected