summaryrefslogtreecommitdiff
path: root/core/io/file_access.h
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 /core/io/file_access.h
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 'core/io/file_access.h')
-rw-r--r--core/io/file_access.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/io/file_access.h b/core/io/file_access.h
index 8ca44306a0..54a0235333 100644
--- a/core/io/file_access.h
+++ b/core/io/file_access.h
@@ -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>;