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.
This commit is contained in:
bruvzg
2022-11-21 15:04:01 +02:00
parent 015dc492de
commit ecec415988
51 changed files with 2756 additions and 150 deletions

View File

@ -192,9 +192,12 @@ public:
static String get_sha256(const String &p_file);
static String get_multiple_md5(const Vector<String> &p_file);
static Vector<uint8_t> get_file_as_array(const String &p_path, Error *r_error = nullptr);
static Vector<uint8_t> get_file_as_bytes(const String &p_path, Error *r_error = nullptr);
static String get_file_as_string(const String &p_path, Error *r_error = nullptr);
static PackedByteArray _get_file_as_bytes(const String &p_path) { return get_file_as_bytes(p_path); }
static String _get_file_as_string(const String &p_path) { return get_file_as_string(p_path); };
template <class T>
static void make_default(AccessType p_access) {
create_func[p_access] = _create_builtin<T>;