Commit: 1a4854898000661dd7cf57492a7a75cb60ea63ef
Author: Harley Acheson
Date:   Wed Sep 14 09:56:50 2022 -0700
Branches: master
https://developer.blender.org/rB1a4854898000661dd7cf57492a7a75cb60ea63ef

BLF: Incorrect Define Used

Replace incorrect usage of GLYPH_ASCII_TABLE_SIZE with correct
KERNING_CACHE_TABLE_SIZE

See D15815 for more details.

Differential Revision: https://developer.blender.org/D15815

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 b96c01e704d..eaea88be9ae 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -377,7 +377,7 @@ BLI_INLINE ft_pix blf_kerning(FontBLF *font, const GlyphBLF 
*g_prev, const Glyph
     FT_Vector delta = {KERNING_ENTRY_UNSET};
 
     /* Get unscaled kerning value from our cache if ASCII. */
-    if ((g_prev->c < KERNING_CACHE_TABLE_SIZE) && (g->c < 
GLYPH_ASCII_TABLE_SIZE)) {
+    if ((g_prev->c < KERNING_CACHE_TABLE_SIZE) && (g->c < 
KERNING_CACHE_TABLE_SIZE)) {
       delta.x = font->kerning_cache->ascii_table[g->c][g_prev->c];
     }
 
@@ -388,7 +388,7 @@ BLI_INLINE ft_pix blf_kerning(FontBLF *font, const GlyphBLF 
*g_prev, const Glyph
     }
 
     /* If ASCII we save this value to our cache for quicker access next time. 
*/
-    if ((g_prev->c < KERNING_CACHE_TABLE_SIZE) && (g->c < 
GLYPH_ASCII_TABLE_SIZE)) {
+    if ((g_prev->c < KERNING_CACHE_TABLE_SIZE) && (g->c < 
KERNING_CACHE_TABLE_SIZE)) {
       font->kerning_cache->ascii_table[g->c][g_prev->c] = (int)delta.x;
     }

_______________________________________________
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

Reply via email to