Change: Rename some freetype things to fontcache.

The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
This commit is contained in:
Peter Nelson
2022-09-15 18:21:27 +01:00
committed by PeterN
parent 273988551d
commit f6ad8e1c9c
16 changed files with 92 additions and 92 deletions

View File

@@ -212,8 +212,8 @@ static inline bool GetDrawGlyphShadow(FontSize size)
return FontCache::Get(size)->GetDrawGlyphShadow();
}
/** Settings for a single freetype font. */
struct FreeTypeSubSetting {
/** Settings for a single font. */
struct FontCacheSubSetting {
std::string font; ///< The name of the font, or path to the font.
uint size; ///< The (requested) size of the font.
bool aa; ///< Whether to do anti aliasing or not.
@@ -221,18 +221,18 @@ struct FreeTypeSubSetting {
const void *os_handle = nullptr; ///< Optional native OS font info. Only valid during font search.
};
/** Settings for the freetype fonts. */
struct FreeTypeSettings {
FreeTypeSubSetting small; ///< The smallest font; mostly used for zoomed out view.
FreeTypeSubSetting medium; ///< The normal font size.
FreeTypeSubSetting large; ///< The largest font; mostly used for newspapers.
FreeTypeSubSetting mono; ///< The mono space font used for license/readme viewers.
/** Settings for the four different fonts. */
struct FontCacheSettings {
FontCacheSubSetting small; ///< The smallest font; mostly used for zoomed out view.
FontCacheSubSetting medium; ///< The normal font size.
FontCacheSubSetting large; ///< The largest font; mostly used for newspapers.
FontCacheSubSetting mono; ///< The mono space font used for license/readme viewers.
};
extern FreeTypeSettings _freetype;
extern FontCacheSettings _fcsettings;
void InitFreeType(bool monospace);
void UninitFreeType();
void InitFontCache(bool monospace);
void UninitFontCache();
bool HasAntialiasedFonts();
#endif /* FONTCACHE_H */