From aa0f4a4bbe370032d8166628f456709be1330118 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sat, 24 Sep 2011 13:19:34 +0000 Subject: FS#12273 - use buflib for font storage. thanks to the testers :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lua/rocklib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/plugins/lua/rocklib.c') 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); -- cgit v1.1