diff options
author | chai <chaifix@163.com> | 2018-09-17 20:59:50 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-09-17 20:59:50 +0800 |
commit | be4b87560dd82068c99948d5d45badd2c42369af (patch) | |
tree | e23bca4997cbc329e668d5d150de4128cfa2ea40 /test/05Font/main.cpp | |
parent | 7d857455fe2355543a70fddfcdcf438b80591972 (diff) |
*update
Diffstat (limited to 'test/05Font/main.cpp')
-rw-r--r-- | test/05Font/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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); |