summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-11-21 15:04:01 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-12-04 18:44:20 +0200
commitecec415988de5b016c70512bbb6a7cfc04ccd0a2 (patch)
treef7c4b665d8b956d4210d48131c85f4c6bb0d136e /main
parent015dc492de33a41eaeb14c0503a6be10466fe457 (diff)
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts. Add function to get system fallback font from a font name, style, text, and language code. Implement system font support for Android. Use system fonts as a last resort fallback.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 2d0843a331..c9a745cf56 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -533,6 +533,10 @@ Error Main::test_setup() {
void Main::test_cleanup() {
ERR_FAIL_COND(!_start_success);
+ for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
+ TextServerManager::get_singleton()->get_interface(i)->cleanup();
+ }
+
EngineDebugger::deinitialize();
ResourceLoader::remove_custom_loaders();
@@ -3300,6 +3304,10 @@ void Main::cleanup(bool p_force) {
ERR_FAIL_COND(!_start_success);
}
+ for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) {
+ TextServerManager::get_singleton()->get_interface(i)->cleanup();
+ }
+
if (movie_writer) {
movie_writer->end();
}