From 111bb1c0bc448fef82e5968d7630e0a883b6ac7c Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 9 Nov 2007 07:43:41 +0000 Subject: [PATCH] (ft_render): Fix handling of baseline_offset. (ft_encapsulate): Set metrics in 26.6 fixed pixel. --- src/font-ft.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/font-ft.c b/src/font-ft.c index fb8e1e6..cd97ecf 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -1756,7 +1756,7 @@ ft_render (MDrawWindow win, int x, int y, /* It is assured that the all glyphs in the current range use the same realized face. */ ft_face = rface->rfont->fontp; - baseline_offset = rface->rfont->baseline_offset; + baseline_offset = rface->rfont->baseline_offset >> 6; if (! gstring->anti_alias) { @@ -2111,9 +2111,9 @@ ft_encapsulate (MFrame *frame, MSymbol data_type, void *data) if (! FT_IS_SCALABLE (ft_face) && FT_Get_BDF_Property (ft_face, "_MULE_BASELINE_OFFSET", &prop) == 0) { - rfont->baseline_offset = prop.u.integer; - rfont->ascent += prop.u.integer; - rfont->descent -= prop.u.integer; + rfont->baseline_offset = prop.u.integer << 6; + rfont->ascent += prop.u.integer << 6; + rfont->descent -= prop.u.integer << 6; } } #endif /* HAVE_FTBDF_H */ -- 1.7.10.4