From ecec415988de5b016c70512bbb6a7cfc04ccd0a2 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:04:01 +0200 Subject: 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. --- main/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main') 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(); } -- cgit v1.2.3