Cleanup: rename kerning table to ascii_table
It wasn't obvious this was only for ASCII characters.
This commit is contained in:
@@ -372,7 +372,7 @@ BLI_INLINE void blf_kerning_step_fast(FontBLF *font,
|
||||
|
||||
if (g_prev != NULL) {
|
||||
if ((c_prev < KERNING_CACHE_TABLE_SIZE) && (c < GLYPH_ASCII_TABLE_SIZE)) {
|
||||
*pen_x_p += font->kerning_cache->table[c][c_prev];
|
||||
*pen_x_p += font->kerning_cache->ascii_table[c][c_prev];
|
||||
}
|
||||
else {
|
||||
FT_Vector delta;
|
||||
|
||||
@@ -95,10 +95,10 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font, GlyphCacheBLF *gc)
|
||||
.y = 0,
|
||||
};
|
||||
if (g && g_prev && FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
|
||||
kc->table[i][j] = (int)delta.x >> 6;
|
||||
kc->ascii_table[i][j] = (int)delta.x >> 6;
|
||||
}
|
||||
else {
|
||||
kc->table[i][j] = 0;
|
||||
kc->ascii_table[i][j] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,11 @@ typedef struct KerningCacheBLF {
|
||||
/* kerning mode. */
|
||||
FT_UInt mode;
|
||||
|
||||
/* only cache a ascii glyph pairs. Only store the x
|
||||
* offset we are interested in, instead of the full FT_Vector. */
|
||||
int table[KERNING_CACHE_TABLE_SIZE][KERNING_CACHE_TABLE_SIZE];
|
||||
/**
|
||||
* Cache a ascii glyph pairs. Only store the x offset we are interested in,
|
||||
* instead of the full #FT_Vector since it's not used for drawing at the moment.
|
||||
*/
|
||||
int ascii_table[KERNING_CACHE_TABLE_SIZE][KERNING_CACHE_TABLE_SIZE];
|
||||
} KerningCacheBLF;
|
||||
|
||||
typedef struct GlyphCacheBLF {
|
||||
|
||||
Reference in New Issue
Block a user