From f557328c86f0c5e2be3ab147f43c131bc245e8e3 Mon Sep 17 00:00:00 2001 From: pixel Date: Tue, 29 Jan 2008 14:10:24 +0000 Subject: fixing unicode. --- lib/LuaFTGL.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/LuaFTGL.cc b/lib/LuaFTGL.cc index a6cbbce..f9be9d5 100644 --- a/lib/LuaFTGL.cc +++ b/lib/LuaFTGL.cc @@ -221,8 +221,8 @@ int sLua_EncapFTFont::EncapFTFont_proceed(Lua * L, int n, EncapFTFont * obj, int case FTFONT_UBBOX: r = 6; x = L->tostring(2); - x.iconv("utf-8", "unicode"); - f->BBox((wchar_t *) x.to_charp(), llx, lly, llz, urx, ury, urz); + x.iconv("utf-8", "utf-32"); + f->BBox(((wchar_t *) x.to_charp()) + 1, llx, lly, llz, urx, ury, urz); L->push(llx); L->push(lly); L->push(llz); @@ -237,16 +237,16 @@ int sLua_EncapFTFont::EncapFTFont_proceed(Lua * L, int n, EncapFTFont * obj, int case FTFONT_UADVANCE: r = 1; x = L->tostring(2); - x.iconv("utf-8", "unicode"); - L->push(f->Advance((wchar_t *) x.to_charp())); + x.iconv("utf-8", "utf-32"); + L->push(f->Advance(((wchar_t *) x.to_charp()) + 1)); break; case FTFONT_RENDER: f->Render(L->tostring(2).to_charp()); break; case FTFONT_URENDER: x = L->tostring(2); - x.iconv("utf-8", "unicode"); - f->Render((wchar_t *) x.to_charp()); + x.iconv("utf-8", "utf-32"); + f->Render(((wchar_t *) x.to_charp()) + 1); break; case FTFONT_ERROR: r = 1; -- cgit v1.2.3