aboutsummaryrefslogtreecommitdiff
path: root/test/05Font/main.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-20 12:01:54 +0800
committerchai <chaifix@163.com>2018-09-20 12:01:54 +0800
commit54f1e742ce9de35013929de6b02948d59db89ccf (patch)
tree59d901cc74e5859a739711c87203e5c95c19b527 /test/05Font/main.cpp
parent6e81b7ddf8c0b378e983c1d2a1fb6f4b43d70d9a (diff)
*update
Diffstat (limited to 'test/05Font/main.cpp')
-rw-r--r--test/05Font/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/05Font/main.cpp b/test/05Font/main.cpp
index 51dc628..cc6b0e6 100644
--- a/test/05Font/main.cpp
+++ b/test/05Font/main.cpp
@@ -25,9 +25,9 @@ Color effect(Color col, Texture tex, vec2 uv, vec2 screen)
Filesystem* fs = Filesystem::get();
fs->mount("../Debug");
Buffer buffer;
- fs->read("font2.ttf", &buffer);
+ fs->read("font.ttf", &buffer);
data = FontData::createFontData((const unsigned char*)buffer.data, buffer.size);
- font = Font::createFont(data, 14);
+ font = Font::createFont(data, 16);
//canvas = Canvas::createCanvas(100, 100);
//page = font->typeset("こんにちは世界!", 120, 20);
}
@@ -46,6 +46,7 @@ void onUpdate(int ms)
void onDraw()
{
+ gl.pushColor(32, 32, 32, 255);
glColor4f(32 / 255.f, 32 / 255.f, 32 / 255.f, 1);
rect(FILL, 0, 0, 500, 500);
glColor4f(1, 1, 1, 1);
@@ -58,6 +59,7 @@ void onDraw()
//font->print(u8"Hello,你好\n啊 world!", 10, 10);
//font->print(u8"Привет мир!", 10, 10 + 15 * 1);
font->print(u8R"(
+One of the most enjoyable arcade game.
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
平安時代中期の物語。紫式部著。ただし,そのすべてが紫式部の筆に成るのでは
ないとする説もある。 54帖。寛弘 (1004~12) 頃成立か。物語は3部に分けてみ
@@ -75,7 +77,7 @@ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
》开始在日本东京电视台播出。2004年,漫画进而改编成电影。2006年,漩涡鸣人入选
美国《新闻周刊》日文版于10月18日发行的特集中选出的“全世界最受尊敬的100位日本
人”。[2]
-)", 10, 10 + 15 * 2, 17, 0);
+)", 10, 10 + 15 * 2, 17,1);
//font->print(u8"你好世界!", 10, 10 + 15*3);
//font->render(page);
glColor4f(1, 1, 1, 1);