summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-07-26 17:37:44 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-07-26 17:37:44 +0100
commit888d8eac4f102f6ecb75878e7717c3495e81a215 (patch)
tree8187d61f8080447f3b5488e7e5f6cfd2c7768c7f
parent2f408f0ecbadcfc895c5067940d840108bbbb77f (diff)
downloadnetsurf-888d8eac4f102f6ecb75878e7717c3495e81a215.tar.gz
netsurf-888d8eac4f102f6ecb75878e7717c3495e81a215.tar.bz2
A few tweaks from when I was looking for internal font renderer bug in wrong place.
-rw-r--r--framebuffer/framebuffer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 9195398cf..fda8aae0d 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -136,12 +136,14 @@ static bool framebuffer_plot_text(int x, int y, const char *text, size_t length,
if (buffer == NULL)
return true;
- /* y is given to the fonts baseline we need it to the fonts top */
- y-=((fb_font->height * 75)/100);
+ /* y is given as the baseline, at 3/4 from top.
+ * we need it to the top */
+ y -= ((fb_font->height * 3) / 4);
- y+=1; /* the coord is the bottom-left of the pixels offset by 1 to make
- * it work since fb coords are the top-left of pixels
- */
+ /* the coord is the bottom-left of the pixels offset by 1 to make
+ * it work since fb coords are the top-left of pixels
+ */
+ y += 1;
blen = strlen(buffer);
@@ -154,7 +156,7 @@ static bool framebuffer_plot_text(int x, int y, const char *text, size_t length,
chrp = fb_font->data + ((unsigned char)buffer[chr] * fb_font->height);
nsfb_plot_glyph1(nsfb, &loc, (uint8_t *)chrp, 32, fstyle->foreground);
- x+=fb_font->width;
+ x += fb_font->width;
}