diff options
Diffstat (limited to 'src/sysbin')
-rw-r--r-- | src/sysbin/lx/lxdrawlib.c | 6 | ||||
-rw-r--r-- | src/sysbin/terminal/main.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/sysbin/lx/lxdrawlib.c b/src/sysbin/lx/lxdrawlib.c index 22c6a3b..1a24fcb 100644 --- a/src/sysbin/lx/lxdrawlib.c +++ b/src/sysbin/lx/lxdrawlib.c @@ -90,16 +90,18 @@ static int font_gc(lua_State *L) { static int font_text_width(lua_State *L) { drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT); const char* txt = luaL_checkstring(L, 2); + int size = luaL_checkinteger(L, 3); - lua_pushinteger(L, g_text_width(f->font, txt)); + lua_pushinteger(L, g_text_width(f->font, txt, size)); return 1; } static int font_text_height(lua_State *L) { drawlib_font *f = (drawlib_font*)luaL_checkudata(L, 1, FONT); const char* txt = luaL_checkstring(L, 2); + int size = luaL_checkinteger(L, 3); - lua_pushinteger(L, g_text_height(f->font, txt)); + lua_pushinteger(L, g_text_height(f->font, txt, size)); return 1; } diff --git a/src/sysbin/terminal/main.c b/src/sysbin/terminal/main.c index 4805f9d..77bf141 100644 --- a/src/sysbin/terminal/main.c +++ b/src/sysbin/terminal/main.c @@ -101,10 +101,10 @@ int main(int argc, char **argv) { term.kb = init_keyboard(); ASSERT(term.kb != 0); - term.font = g_load_ascii_bitmap_font("sys:/fonts/default.bf"); + term.font = g_load_ascii_bitmap_font("sys:/fonts/pcvga.bf"); ASSERT(term.font != 0); - term.cw = g_text_width(term.font, "#"); - term.ch = g_text_height(term.font, "#"); + term.cw = g_text_width(term.font, "#", 8); + term.ch = g_text_height(term.font, "#", 8); gip_handler_t *h = new_gip_handler(&term_gip_cb, &term); ASSERT(h != 0); |