From d94f4a50e1e967c5d225720002c439107124bc13 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 14 Oct 2018 09:47:53 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E5=AD=97=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/05Font/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/05Font/main.cpp') diff --git a/test/05Font/main.cpp b/test/05Font/main.cpp index 44aefac..6eebe04 100644 --- a/test/05Font/main.cpp +++ b/test/05Font/main.cpp @@ -66,8 +66,10 @@ Color frag(Color col, Texture tex, Vertex v) fs->read("font.ttf", &buffer); data = TTFData::createTTFData((const unsigned char*)buffer.data, buffer.size); font = TTF::createTTF(data, 15); - page = font->typeset(Unicode::Iterator(Unicode::Encode::UTF8, u8R"(测试)"), 15, 0); - delete data; + const char* str = u8R"(源氏物语げんじものがたり)"; + int l = strlen(str); + page = font->typeset(unicode::Text(unicode::Encode::UTF8, str, strlen(str)), 15, 0); + delete data; //canvas = Canvas::createCanvas(100, 100); //page = font->typeset("こんにちは世界!", 120, 20); buffer.clear(); -- cgit v1.1-26-g67d0