diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-07-29 06:09:20 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-07-29 06:09:20 +0300 |
commit | e9bd6abde37c276f1b8a9a22f5312d794b0f159b (patch) | |
tree | a376e0a85f6bd9f11354ac4fa00e9f86da323981 /source/blender/blenfont | |
parent | c0845abd897ffd547cd0ac226da99318d5c2fb30 (diff) |
BLF: New Font Stack for Better Language Coverage
Replace our existing two fonts with a stack of new fonts to increase
and improve language coverage and to add many new symbols and icons.
Covers glyphs of top 44 languages - 1.5 billion more potential users.
See D10887 for lots of details.
Differential Revision: https://developer.blender.org/D10887
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 8cb368e2075..75824ae056f 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -18,10 +18,10 @@ extern "C" { #define BLF_DATAFILES_FONTS_DIR "fonts" /* File name of the default variable-width font. */ -#define BLF_DEFAULT_PROPORTIONAL_FONT "droidsans.ttf" +#define BLF_DEFAULT_PROPORTIONAL_FONT "DejaVuSans.woff2" /* File name of the default fixed-pitch font. */ -#define BLF_DEFAULT_MONOSPACED_FONT "bmonofont-i18n.ttf" +#define BLF_DEFAULT_MONOSPACED_FONT "DejaVuSansMono.woff2" /* enable this only if needed (unused circa 2016) */ #define BLF_BLUR_ENABLE 0 diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 326cb2bcc27..48ddbc9f920 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -594,6 +594,10 @@ static FT_UInt blf_glyph_index_from_charcode(FontBLF **font, const uint charcode } } +#ifdef DEBUG + printf("Unicode character U+%04X not found in loaded fonts. \n", charcode); +#endif + /* Not found in the stack, return from Last Resort if there is one. */ if (last_resort && blf_ensure_face(last_resort)) { glyph_index = FT_Get_Char_Index(last_resort->face, charcode); |