From d3c9ee466e44933bdd03beef32395fe3248f999a Mon Sep 17 00:00:00 2001 From: GetAway Date: Sat, 3 Dec 2016 21:18:35 +0100 Subject: [PATCH] - fix detection of text background color --- text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text.c b/text.c index c0f9594..f647870 100644 --- a/text.c +++ b/text.c @@ -274,7 +274,7 @@ int RenderChar(FT_ULong currentchar, int _sx, int _sy, int _ex, int color) if (_sx + sbit->xadvance >= _ex) return -1; /* limit to maxwidth */ - uint32_t bgcolor = *(lbb + (sy + _sy) * stride + (sx + _sx)); + uint32_t bgcolor = *(lbb + (sy + _sy - sbit->top) * stride + (sx + _sx)); uint32_t fgcolor = bgra[color]; uint32_t *colors = lookup_colors(fgcolor, bgcolor); uint32_t *p = lbb + (sx + _sx + sbit->left + kerning.x) + stride * (sy + _sy - sbit->top - _d); -- 2.39.5