aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/ttf.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-15 12:49:54 +0800
committerchai <chaifix@163.com>2018-10-15 12:49:54 +0800
commit68b60be0d1da84aa670d29b87b26ab3e3db51b69 (patch)
tree661b2b1aff66ce3068c2bd6e4abe66734e3d1706 /src/lua/modules/graphics/ttf.cpp
parent437ea76fc9b61240b2f8d1b0b800f3f7a73af766 (diff)
*增加默认字体
Diffstat (limited to 'src/lua/modules/graphics/ttf.cpp')
-rw-r--r--src/lua/modules/graphics/ttf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/modules/graphics/ttf.cpp b/src/lua/modules/graphics/ttf.cpp
index 19e9e92..3d88a62 100644
--- a/src/lua/modules/graphics/ttf.cpp
+++ b/src/lua/modules/graphics/ttf.cpp
@@ -28,7 +28,7 @@ namespace lua
{
Proxy* p = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_TTF);
TTF* ttf = p->getObject<TTF>();
- int lineheight = luax_checkinteger(L, 3);
+ int lineheight = luax_optnumber(L, 3, ttf->getFontSize());
int spacing = luax_optnumber(L, 4, 0);
Page* page = nullptr;
if (luax_isstring(L, 2))