diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-14 18:53:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-21 20:07:04 +0300 |
commit | 34029fc71a3cc7e69f977462d4b3f09eb10ccca2 (patch) | |
tree | e92af5b985e31177bba8621e5696e8243b8a2b46 /source/blender/makesrna | |
parent | abc4beb245c123f570072e642287c44b7c8f2b86 (diff) |
UI: disable new text hinting from D3201 by default for now.
This changes the text hinting setting to be an enum with options
Auto / None / Slight / Full. The default is Auto which currently disables
hinting.
The hinting was tested with a new FreeType version, but this is not what
is used on the buildbots an official release environment, and the fonts
look quite bad because of that. Once FreeType has been upgraded we can
change the default.
Even then the results are not ideal, perhaps due to missing subpixel
positioning and linear color blending support in BLF.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 315ac26c1d2..c3e30de10af 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3973,6 +3973,14 @@ static void rna_def_userdef_system(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static const EnumPropertyItem text_hinting_items[] = { + {0, "AUTO", 0, "Auto", ""}, + {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""}, + {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""}, + {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "UserPreferencesSystem", NULL); RNA_def_struct_sdna(srna, "UserDef"); RNA_def_struct_nested(brna, srna, "UserPreferences"); @@ -4207,9 +4215,10 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased"); RNA_def_property_update(prop, 0, "rna_userdef_text_update"); - prop = RNA_def_property(srna, "use_text_hinting", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_HINTING); - RNA_def_property_ui_text(prop, "Text Hinting", "Draw user interface text with hinting"); + prop = RNA_def_property(srna, "text_hinting", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "text_render"); + RNA_def_property_enum_items(prop, text_hinting_items); + RNA_def_property_ui_text(prop, "Text Hinting", "Method for making user interface text render sharp"); RNA_def_property_update(prop, 0, "rna_userdef_text_update"); prop = RNA_def_property(srna, "select_method", PROP_ENUM, PROP_NONE); |