From: GetAway Date: Sat, 3 Dec 2016 20:20:41 +0000 (+0100) Subject: - fix detection of text background color X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=85e1db4fcb8792bc31a15e9192fcb3fb55d02a58;p=shellexec.git - fix detection of text background color --- diff --git a/text.c b/text.c index 3fc9bd2..d584191 100644 --- a/text.c +++ b/text.c @@ -287,7 +287,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 + (starty + _sy) * stride + (startx + _sx)); + uint32_t bgcolor = *(lbb + (starty + _sy - sbit->top) * stride + (startx + _sx)); uint32_t fgcolor = bgra[color]; uint32_t *colors = lookup_colors(fgcolor, bgcolor); uint32_t *p = lbb + (startx + _sx + sbit->left + kerning.x) + stride * (starty + _sy - sbit->top - _d);