From 601442f94fc0dcfdc5a117c5f87d90b156d53045 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 31 Oct 2021 14:27:26 +0800 Subject: +static initiator --- Editor/EditorMain.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Editor/EditorMain.cpp') diff --git a/Editor/EditorMain.cpp b/Editor/EditorMain.cpp index e31da28..289eed4 100644 --- a/Editor/EditorMain.cpp +++ b/Editor/EditorMain.cpp @@ -22,15 +22,13 @@ void TestFont() { TextGeneratingSettings setting; setting.margin = 5; - setting.padding = 3; - setting.atlasSize = Internal::Vector2(256, 256); + setting.padding = 5; + setting.atlasSize = Internal::Vector2(512, 512); + TextGenerator::Instance()->Setup(setting); - TextGenerator::Instance()->RenderCharacter(L'好', 14); - TextGenerator::Instance()->RenderCharacter(L'大', 14); - TextGenerator::Instance()->RenderCharacter(L'家', 14); - TextGenerator::Instance()->RenderCharacter(L'晚', 14); - TextGenerator::Instance()->RenderCharacter(L'上', 14); - TextGenerator::Instance()->RenderCharacter(L'快', 14); + auto content = L"abcdf与电子计算机的区别 与电子计算机的最大区别在于: 只是简单的计算工具,有些机型具备函数计算功能,有些机型具备一定的贮存功能,但一般只能存储几组数据。计算机则具备复杂存贮功能、控制功能,更加"; + TextGenerator::Instance()->RenderCharacters((character::Codepoint*)content, wcslen(content), 14); + } int BeforeMainLoop(lua_State* L) -- cgit v1.1-26-g67d0