diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 4c5f598ffeb..45761a3f319 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -441,9 +441,9 @@ static void blf_glyph_calc_rect_test(rctf *rect, GlyphBLF *g, float x, float y) { /* intentionally check clipping without shadow offset and negative kerning */ rect->xmin = floorf(x + MAX2(0.0f, g->pos_x)); - rect->xmax = rect->xmin + (float)g->width; + rect->xmax = rect->xmin + (float)g->width + MIN2(0.0f, g->pos_x); rect->ymin = floorf(y + MAX2(0.0f, g->pos_y)); - rect->ymax = rect->ymin - (float)g->height; + rect->ymax = rect->ymin - (float)g->height - MIN2(0.0f, g->pos_y); } static void blf_glyph_calc_rect_shadow(rctf *rect, GlyphBLF *g, float x, float y, FontBLF *font) |