diff options
Diffstat (limited to 'Runtime/GUI/Font.h')
-rw-r--r-- | Runtime/GUI/Font.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<character::Codepoint>& codepoint, int pixelSize); + GET(Vector2, AtlasSize, m_AtlasSize); + private: Texture* CreateAtlas(); GlyphAtals* RequestAtlas(int pixelSize, Vector2 preferSize); |