added freetype text rendering (still buggy)

this allows to render glyphs and also brings a simple
engine for rendering UTF-8 strings onto the framebuffer.
blitting to uneven offset is implemented here, too, but
needs more work and is still buggy.

In the end, this will allow for a simple GUI.
This commit is contained in:
HW
2011-12-01 01:35:53 +01:00
parent ff38118a89
commit f307264fb6
9 changed files with 369 additions and 10 deletions

View File

@@ -30,6 +30,18 @@ static int newBlitBuffer(lua_State *L) {
return 1;
}
static int getWidth(lua_State *L) {
BlitBuffer *bb = (BlitBuffer*) luaL_checkudata(L, 1, "blitbuffer");
lua_pushinteger(L, bb->w);
return 1;
}
static int getHeight(lua_State *L) {
BlitBuffer *bb = (BlitBuffer*) luaL_checkudata(L, 1, "blitbuffer");
lua_pushinteger(L, bb->h);
return 1;
}
static int freeBlitBuffer(lua_State *L) {
BlitBuffer *bb = (BlitBuffer*) luaL_checkudata(L, 1, "blitbuffer");
@@ -43,6 +55,8 @@ static const struct luaL_reg blitbuffer_func[] = {
};
static const struct luaL_reg blitbuffer_meth[] = {
{"getWidth", getWidth},
{"getHeight", getHeight},
{"free", freeBlitBuffer},
{NULL, NULL}
};