From be4b87560dd82068c99948d5d45badd2c42369af Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 17 Sep 2018 20:59:50 +0800 Subject: *update --- test/05Font/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/05Font/main.cpp') diff --git a/test/05Font/main.cpp b/test/05Font/main.cpp index 30b0e3d..58c13ac 100644 --- a/test/05Font/main.cpp +++ b/test/05Font/main.cpp @@ -12,11 +12,11 @@ FontData* data = nullptr; void onLoad() { Filesystem* fs = Filesystem::get(); - fs->mount("D:/Documents/VisualStudio2017/Projects/Jin/libjin/min/build/Debug"); + fs->mount("D:/Jin/libjin/min/build/Debug"); Buffer buffer; - fs->read("SIMYOU.TTF", &buffer); + fs->read("font.ttf", &buffer); data = FontData::createFontData((const unsigned char*)buffer.data, buffer.size); - font = Font::createFont(data, 15); + font = Font::createFont(data, 50); //canvas = Canvas::createCanvas(100, 100); } @@ -40,7 +40,10 @@ void onDraw() //Canvas::bind(canvas); if (font != nullptr) { - font->print(u8"hello, worldjqp", 0, 0); + glColor4f(1, 1, 0, 1); + //font->print(u8"¡ºÔ´ÊÏÎïÕZ¡»£¨¤²¤ó¤¸¤â¤Î¤¬", 0, 0); + font->print(u8"Ô´", 0, 0); + glColor4f(1, 1, 1, 1); } //Canvas::unbind(); //canvas->draw(0, 0, 2, 2, 0); -- cgit v1.1-26-g67d0