From a96094205b55c746fe1517bfdc9b88cb8d7179ec Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 13 Mar 2011 10:51:47 +0000 Subject: Scale font sizes by the screen DPI, rather than assuming 72 svn path=/trunk/netsurf/; revision=12014 --- framebuffer/font_freetype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'framebuffer') diff --git a/framebuffer/font_freetype.c b/framebuffer/font_freetype.c index 44d6701dc..c1e5fcc3a 100644 --- a/framebuffer/font_freetype.c +++ b/framebuffer/font_freetype.c @@ -24,6 +24,7 @@ #include FT_CACHE_H #include "css/css.h" +#include "css/utils.h" #include "render/font.h" #include "utils/utf8.h" #include "utils/log.h" @@ -365,7 +366,7 @@ static void fb_fill_scalar(const plot_font_style_t *fstyle, FTC_Scaler srec) srec->width = srec->height = (fstyle->size * 64) / FONT_SIZE_SCALE; srec->pixel = 0; - srec->x_res = srec->y_res = 72; + srec->x_res = srec->y_res = FIXTOINT(nscss_screen_dpi); } FT_Glyph fb_getglyph(const plot_font_style_t *fstyle, uint32_t ucs4) -- cgit v1.2.3