diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-08-11 06:50:49 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-08-11 06:50:49 +0300 |
commit | 51381c94d8e046c78ccba190bff137cc9f11dcef (patch) | |
tree | 44c93df0e9b74d3c9a2ccd55e0dbcfe34c7a041b | |
parent | f35d671f466da324ebe70eef3edf12bd3b2b63c9 (diff) |
BLF: Fallback Broken After Cache Removal
Font fallback feature not working after reverting the implementation
of the cache system. Missing an blf_ensure_face before
FT_Get_Char_Index. Otherwise glyphs not found in fonts without faces.
Own Code
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 5f904d86b03..b958f3c2336 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -70,7 +70,7 @@ static ft_pix blf_font_width_max_ft_pix(struct FontBLF *font); /* Return glyph id from charcode. */ uint blf_get_char_index(struct FontBLF *font, uint charcode) { - return FT_Get_Char_Index(font->face, charcode); + return blf_ensure_face(font) ? FT_Get_Char_Index(font->face, charcode) : 0; } /* -------------------------------------------------------------------- */ |