More Font utils
This commit is contained in:
@@ -8,5 +8,6 @@ enum class FontStyle {
|
||||
FROM_HEIGHT, // Pick font to best fill the height
|
||||
};
|
||||
|
||||
constexpr uint8_t get_fontstyle_height(const FontStyle font);
|
||||
constexpr uint8_t get_fontstyle_width(const FontStyle font);
|
||||
constexpr uint8_t get_fontstyle_height(const FontStyle font);
|
||||
constexpr uint8_t get_fontstyle_width(const FontStyle font);
|
||||
constexpr FontStyle get_fontstyle_fromHeight(const uint8_t height);
|
||||
@@ -9,4 +9,6 @@ constexpr uint8_t get_fontstyle_width(const FontStyle font) {
|
||||
if (font == FontStyle::SMALL)
|
||||
return 6;
|
||||
return 12;
|
||||
}
|
||||
}
|
||||
|
||||
constexpr FontStyle get_fontstyle_fromHeight(const uint8_t height) { return (height <= 8) ? FontStyle::SMALL : FontStyle::LARGE; }
|
||||
Reference in New Issue
Block a user