Codechange: Replace magic numbers by constants.

This commit is contained in:
Michael Lutz
2021-02-13 22:44:45 +01:00
parent 8121706b89
commit 21a2cd7bc3
3 changed files with 7 additions and 4 deletions

View File

@@ -22,6 +22,9 @@ static const byte SHADOW_COLOUR = 2;
/** Font cache for fonts that are based on a TrueType font. */
class TrueTypeFontCache : public FontCache {
protected:
static constexpr int MAX_GLYPH_DIM = 256; ///< Maximum glyph dimensions.
static constexpr uint MAX_FONT_MIN_REC_SIZE = 20u; ///< Upper limit for the recommended font size in case a font file contains nonsensical values.
int req_size; ///< Requested font size.
int used_size; ///< Used font size.