From: handa Date: Fri, 9 Nov 2007 07:43:41 +0000 (+0000) Subject: (ft_render): Fix handling of baseline_offset. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=111bb1c0bc448fef82e5968d7630e0a883b6ac7c;p=m17n%2Fm17n-lib.git (ft_render): Fix handling of baseline_offset. (ft_encapsulate): Set metrics in 26.6 fixed pixel. --- 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 */