diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-02-13 22:44:45 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-14 11:48:58 +0100 |
commit | 21a2cd7bc386207c68735edc05a21bb987dddd6b (patch) | |
tree | 79334d04bcf0b491e09a982ce8813dda6a5071c5 /src/fontcache_internal.h | |
parent | 8121706b89998769fc37c02e89205ca414358f82 (diff) | |
download | openttd-21a2cd7bc386207c68735edc05a21bb987dddd6b.tar.xz |
Codechange: Replace magic numbers by constants.
Diffstat (limited to 'src/fontcache_internal.h')
-rw-r--r-- | src/fontcache_internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fontcache_internal.h b/src/fontcache_internal.h index 09e676234..2f7454733 100644 --- a/src/fontcache_internal.h +++ b/src/fontcache_internal.h @@ -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. |