From cc6b21e5d3f36aae6340203f9a1998e7c4d382b6 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 26 Jul 2012 17:27:42 +0100 Subject: Don't add top clipping to bottom clipping. Fixes internal font rendering. --- src/plot/common.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/plot/common.c b/src/plot/common.c index 5675ad6..2b8a939 100644 --- a/src/plot/common.c +++ b/src/plot/common.c @@ -143,19 +143,16 @@ glyph1(nsfb_t *nsfb, int xoff, yoff; /* x and y offset into image */ int x = loc->x0; int y = loc->y0; - int width = loc->x1 - loc->x0; - int height = loc->y1 - loc->y0; + int width; + int height; const uint8_t *fntd; uint8_t row; if (!nsfb_plot_clip_ctx(nsfb, loc)) return true; - if (height > (loc->y1 - loc->y0)) - height = (loc->y1 - loc->y0); - - if (width > (loc->x1 - loc->x0)) - width = (loc->x1 - loc->x0); + height = loc->y1 - y; + width = loc->x1 - x; xoff = loc->x0 - x; yoff = loc->y0 - y; -- cgit v1.2.3