From 68b60be0d1da84aa670d29b87b26ab3e3db51b69 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 15 Oct 2018 12:49:54 +0800 Subject: =?UTF-8?q?*=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/main.lua') 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 -- cgit v1.1-26-g67d0