]> git.webhop.me Git - tuxwetter.git/commitdiff
tuxwetter: use OFFSET_MIN for better bg detection
authorGetAway <get-away@t-online.de>
Thu, 12 Oct 2017 13:19:48 +0000 (15:19 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Thu, 12 Oct 2017 13:38:44 +0000 (15:38 +0200)
text.c
tuxwetter.c

diff --git a/text.c b/text.c
index 129ceae1583e91ce904921585cb04c27d80ad65c..4f3b608ce21f815eaf2647d7e6dbe919a0393f5e 100644 (file)
--- a/text.c
+++ b/text.c
@@ -280,7 +280,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 - _d - 1) * swidth + (sx + _sx + sbit->left));
+               uint32_t bgcolor = *(lbb + (sy + _sy - _d - 1) * swidth + (sx + _sx + OFFSET_MIN + sbit->left));
                uint32_t fgcolor = bgra[color];
                uint32_t *colors = lookup_colors(fgcolor, bgcolor);
                uint32_t *p = lbb + (sx + _sx + sbit->left + kerning.x) + swidth * (sy + _sy - sbit->top - _d);
index 9b41bae5fc8bd8bb504f943c5c3222abdf990b26..413c89209812bce9f7f7db11a7d4513c711fec8c 100644 (file)
@@ -44,7 +44,7 @@
 #include "gifdecomp.h"
 #include "icons.h"
 
-#define P_VERSION "4.10"
+#define P_VERSION "4.11"
 #define S_VERSION ""