summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 4657201..ddd4081 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -433,6 +433,11 @@ RB_WRAP(font_getstringsize)
int fontnumber = luaL_checkint(L, 2);
int w, h;
+ if (fontnumber == FONT_UI)
+ fontnumber = rb->global_status->font_id[SCREEN_MAIN];
+ else
+ fontnumber = FONT_SYSFIXED;
+
int result = rb->font_getstringsize(str, &w, &h, fontnumber);
lua_pushinteger(L, result);
lua_pushinteger(L, w);