Codechange: reduce code duplication
This commit is contained in:
@@ -218,6 +218,22 @@ struct FontCacheSettings {
|
||||
|
||||
extern FontCacheSettings _fcsettings;
|
||||
|
||||
/**
|
||||
* Get the settings of a given font size.
|
||||
* @param fs The font size to look up.
|
||||
* @return The settings.
|
||||
*/
|
||||
static inline FontCacheSubSetting *GetFontCacheSubSetting(FontSize fs)
|
||||
{
|
||||
switch (fs) {
|
||||
default: NOT_REACHED();
|
||||
case FS_SMALL: return &_fcsettings.small;
|
||||
case FS_NORMAL: return &_fcsettings.medium;
|
||||
case FS_LARGE: return &_fcsettings.large;
|
||||
case FS_MONO: return &_fcsettings.mono;
|
||||
}
|
||||
}
|
||||
|
||||
void InitFontCache(bool monospace);
|
||||
void UninitFontCache();
|
||||
bool HasAntialiasedFonts();
|
||||
|
Reference in New Issue
Block a user