Fix #115938: BLF Handle Negative Left-Side Bearings #115965

Merged
Harley Acheson merged 1 commits from Harley/blender:NegativeBearings into main 2023-12-09 01:52:55 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -1368,7 +1368,7 @@ static void blf_glyph_calc_rect_test(rcti *rect, GlyphBLF *g, const int x, const
/* Intentionally check with `g->advance`, because this is the
* width used by BLF_width. This allows that the text slightly
* overlaps the clipping border to achieve better alignment. */
rect->xmin = x + g->pos[0] + 1;
rect->xmin = x + abs(g->pos[0]) + 1;
rect->xmax = x + std::min(ft_pix_to_int(g->advance_x), g->dims[0]);
rect->ymin = y;
rect->ymax = rect->ymin - g->dims[1];