diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-03-13 13:38:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-13 13:38:35 +0100 |
commit | 96bda9c463b08797493bb39d639f96f12a8d7dbb (patch) | |
tree | a2abc5acedd8c96bb531ee1487ded818bd0221ce /scene/resources/dynamic_font.h | |
parent | 8b31b980367c12fd83d70d2ebcca97e060f6686a (diff) | |
parent | a0ddd6122c988880c0f4f37c4d0b22293d906861 (diff) |
Merge pull request #17094 from Calinou/add-dynamicfont-hinting-options
Add an hinting mode setting to DynamicFonts
Diffstat (limited to 'scene/resources/dynamic_font.h')
-rw-r--r-- | scene/resources/dynamic_font.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h index d8adf35b6b..db8bd87587 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/dynamic_font.h @@ -64,10 +64,20 @@ public: } }; + enum Hinting { + HINTING_NONE, + HINTING_LIGHT, + HINTING_NORMAL + }; + + Hinting get_hinting() const; + void set_hinting(Hinting p_hinting); + private: const uint8_t *font_mem; int font_mem_size; bool force_autohinter; + Hinting hinting; String font_path; Map<CacheID, DynamicFontAtSize *> size_cache; @@ -91,6 +101,8 @@ public: ~DynamicFontData(); }; +VARIANT_ENUM_CAST(DynamicFontData::Hinting); + class DynamicFontAtSize : public Reference { GDCLASS(DynamicFontAtSize, Reference) |