Commit: 51381c94d8e046c78ccba190bff137cc9f11dcef Author: Harley Acheson Date: Wed Aug 10 20:50:49 2022 -0700 Branches: master https://developer.blender.org/rB51381c94d8e046c78ccba190bff137cc9f11dcef
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 =================================================================== M source/blender/blenfont/intern/blf_font.c =================================================================== 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; } /* -------------------------------------------------------------------- */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs