diff options
Diffstat (limited to 'bin/main.lua')
-rw-r--r-- | bin/main.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/main.lua b/bin/main.lua index bee78ca..f5f2a34 100644 --- a/bin/main.lua +++ b/bin/main.lua @@ -10,7 +10,7 @@ function jin.core.onLoad() local bitmap = jin.graphics.newBitmap("font2.png") local tfdata = jin.graphics.newTTFData("font.ttf") tf = tfdata:newTTF(15) - page = tf:typeset("this is a test", 16) + page = tf:typeset("this is a test") end function jin.core.onEvent(e) @@ -21,6 +21,8 @@ end function jin.core.onDraw() jin.graphics.useShader(shader) - jin.graphics.print("this 你好 is a test", tf, 10, 10, 16) + jin.graphics.setFont(tf) + jin.graphics.print("你好error: this is a test", 0, 0, 16, 0) + jin.graphics.unsetFont() jin.graphics.unuseShader() end
\ No newline at end of file |