diff --git a/src/fbprimitive.c b/src/fbprimitive.c index a7f0ea0..189c62d 100644 --- a/src/fbprimitive.c +++ b/src/fbprimitive.c @@ -131,7 +131,6 @@ static void internal_textout(INT32 x, INT32 y, INT32 width, INT32 height, PBYTE lbuf = (PUINT16)alloca(width * sizeof(UINT16)); for (i=0; i> 3) & 0x1F); } - Log(LDEBUG, "rendering row %d", i); memcpy(dptr, lbuf, width * sizeof(UINT16)); dptr += Fb_Info->width; } diff --git a/src/fontengine.c b/src/fontengine.c index 6ed7ec7..f392706 100644 --- a/src/fontengine.c +++ b/src/fontengine.c @@ -61,9 +61,11 @@ HRESULT FontEng_do_text_out(INT32 x, INT32 y, PCSTR pstr, TEXTOUTFUNC renderfunc FT_UInt glyph_index; FT_Error err; + y += (stdfont->size->metrics.ascender >> 6); + while (*pstr) { - glyph_index = FT_Get_Char_Index(stdfont, *pstr++); + glyph_index = FT_Get_Char_Index(stdfont, *pstr); err = FT_Load_Glyph(stdfont, glyph_index, FT_LOAD_DEFAULT); if (err != 0) { @@ -76,9 +78,11 @@ HRESULT FontEng_do_text_out(INT32 x, INT32 y, PCSTR pstr, TEXTOUTFUNC renderfunc hr = E_FAIL; break; } - (*renderfunc)(x, y, slot->bitmap.width, slot->bitmap.rows, slot->bitmap.buffer); + (*renderfunc)(x + slot->bitmap_left, y - slot->bitmap_top, slot->bitmap.width, + slot->bitmap.rows, slot->bitmap.buffer); x += slot->advance.x >> 6; y += slot->advance.y >> 6; + pstr++; } return hr; }