diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-11-21 15:04:01 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-12-04 18:44:20 +0200 |
commit | ecec415988de5b016c70512bbb6a7cfc04ccd0a2 (patch) | |
tree | f7c4b665d8b956d4210d48131c85f4c6bb0d136e /core/os/os.h | |
parent | 015dc492de33a41eaeb14c0503a6be10466fe457 (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/os/os.h')
-rw-r--r-- | core/os/os.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/os/os.h b/core/os/os.h index af7b40f3ec..72a91f318a 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,7 +150,8 @@ public: virtual int get_low_processor_usage_mode_sleep_usec() const; virtual Vector<String> get_system_fonts() const { return Vector<String>(); }; - virtual String get_system_font_path(const String &p_font_name, bool p_bold = false, bool p_italic = false) const { return String(); }; + virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return String(); }; + virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const { return Vector<String>(); }; virtual String get_executable_path() const; virtual Error execute(const String &p_path, const List<String> &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false) = 0; virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) = 0; |