Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-08-11 06:50:49 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-08-11 06:50:49 +0300
commit51381c94d8e046c78ccba190bff137cc9f11dcef (patch)
tree44c93df0e9b74d3c9a2ccd55e0dbcfe34c7a041b /source/blender/blenfont
parentf35d671f466da324ebe70eef3edf12bd3b2b63c9 (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
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_font.c2
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;
}
/* -------------------------------------------------------------------- */