summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/LuaFTGL.cc12
1 files changed, 6 insertions, 6 deletions
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;