From 72812a7b47f90f9460e54e8149ba9199a7841244 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Nov 2021 19:44:01 +0800 Subject: ! Text mesh done --- Runtime/GUI/Font.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Runtime/GUI/Font.h') diff --git a/Runtime/GUI/Font.h b/Runtime/GUI/Font.h index 9fea14e..e55e78f 100644 --- a/Runtime/GUI/Font.h +++ b/Runtime/GUI/Font.h @@ -16,7 +16,7 @@ struct Character { unsigned int atlas; // atlas索引 - Rect position; // 在altas里的位置 + Rect position; // 在altas里的位置,以左上角为原点的,和GL的Y镜像 Vector2 bearing; // 左上角相对于原点的偏移 unsigned int advance; // 总宽,算上了间隔 }; @@ -110,6 +110,8 @@ public: void RenderCharacters(character::Codepoint* codepoint, int n, int pixelSize); void RenderCharacters(std::vector& codepoint, int pixelSize); + GET(Vector2, AtlasSize, m_AtlasSize); + private: Texture* CreateAtlas(); GlyphAtals* RequestAtlas(int pixelSize, Vector2 preferSize); -- cgit v1.1-26-g67d0