diff options
Diffstat (limited to 'source/blender/blenfont/intern/blf_font.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index ee4ba0ee71a..a3c5232cc76 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -146,20 +146,22 @@ void blf_font_draw(FontBLF *font, char *str) if (FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta) == 0) { pen_x += delta.x >> 6; -/* - if (pen_x < old_pen_x) - pen_x= old_pen_x; -*/ + + if (font->flags & BLF_OVERLAP_CHAR) { + if (pen_x < old_pen_x) + pen_x= old_pen_x; + } } } if (font->flags & BLF_USER_KERNING) { old_pen_x= pen_x; pen_x += font->kerning; -/* - if (pen_x < old_pen_x) - pen_x= old_pen_x; -*/ + + if (font->flags & BLF_OVERLAP_CHAR) { + if (pen_x < old_pen_x) + pen_x= old_pen_x; + } } /* do not return this loop if clipped, we want every character tested */ @@ -228,20 +230,22 @@ void blf_font_boundbox(FontBLF *font, char *str, rctf *box) if (FT_Get_Kerning(font->face, g_prev_index, glyph_index, FT_KERNING_UNFITTED, &delta) == 0) { pen_x += delta.x >> 6; -/* - if (pen_x < old_pen_x) - old_pen_x= pen_x; -*/ + + if (font->flags & BLF_OVERLAP_CHAR) { + if (pen_x < old_pen_x) + pen_x= old_pen_x; + } } } if (font->flags & BLF_USER_KERNING) { old_pen_x= pen_x; pen_x += font->kerning; -/* - if (pen_x < old_pen_x) - old_pen_x= pen_x; -*/ + + if (font->flags & BLF_OVERLAP_CHAR) { + if (pen_x < old_pen_x) + pen_x= old_pen_x; + } } gbox.xmin= g->box.xmin + pen_x; |