diff options
author | chai <chaifix@163.com> | 2021-10-31 14:27:26 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-31 14:27:26 +0800 |
commit | 601442f94fc0dcfdc5a117c5f87d90b156d53045 (patch) | |
tree | b006bcd6a28a965a900c64f4716007fcb45eee98 /Editor/EditorMain.cpp | |
parent | 26f05c6e3dcac9995345fb5a2b031be7e3ea79e9 (diff) |
+static initiator
Diffstat (limited to 'Editor/EditorMain.cpp')
-rw-r--r-- | Editor/EditorMain.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
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)
|