Date: Fri, 3 Sep 2004 09:42:18 +0800 From: 銘麟 Subject: [nanogui] calling freetype2_drawtext with GR_TFTOP I use Microwindows 0.90 on a RISC CPU. When I called GrText(wid, gc, 10, 80, "This is a test", -1, GR_TFASCII | GR_TFTOP) with freetype2 fonts, the string "This is a test" was drawed much higher than (10, 80). I think it is a bug of engine\font_freetype2.c. Now I modified the 1184th line of engine\font_freetype2.c (in the functione freetype2_drawtext) as follows: the original code: if (flags & MWTF_BOTTOM) { pos.y = (abs(size->metrics.descender) + 63) & ~63; /* descent */ } else if (flags & MWTF_TOP) { pos.y = -(size->metrics.ascender + 63) & ~63; /* -ascent */ } else { pos.y = 0; } modified code: if (flags & MWTF_BOTTOM) { pos.y = -(abs(size->metrics.descender) + 63) & ~63; /* descent */ } else if (flags & MWTF_TOP) { pos.y = (size->metrics.ascender + 63) & ~63; /* -ascent */ } else { pos.y = 0; } Regards, Kao