diff options
author | Voylin <0voylin0@gmail.com> | 2022-09-11 16:16:43 +0900 |
---|---|---|
committer | Voylin <0voylin0@gmail.com> | 2022-09-14 21:29:54 +0900 |
commit | ab255caa07f34cc8212f4cdd2390d9257a657095 (patch) | |
tree | 98e98af3dc22f21f33aca5ad773c94e21d0780f1 | |
parent | b52305351d417c47ce019529fb511ecfd72c07e4 (diff) |
Adding tff, otf, woff(2) to custom font extensions
This pull request is to fix #65633
When trying to add a custom font, my '.ttf' and '.otf' fonts were not visible unless I selected 'All files'. By adding these to the custom property info makes it more convenient to select a different font, without doing the extra clicks to select 'All Files'.
Not a big change, but something I wanted to fix as it seems appropriate to do so.
-rw-r--r-- | scene/theme/theme_db.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/theme/theme_db.cpp b/scene/theme/theme_db.cpp index d6e892cd93..71d9b9d58a 100644 --- a/scene/theme/theme_db.cpp +++ b/scene/theme/theme_db.cpp @@ -49,7 +49,7 @@ void ThemeDB::initialize_theme() { ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom", PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)); String font_path = GLOBAL_DEF_RST("gui/theme/custom_font", ""); - ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)); + ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.otf,*.ttf,*.woff,*.woff2,*.fnt,*.font,*.pfb,*.pfm", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)); TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)GLOBAL_DEF_RST("gui/theme/default_font_antialiasing", 1); ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_font_antialiasing", PropertyInfo(Variant::INT, "gui/theme/default_font_antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD sub-pixel", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED)); |