diff options
author | chai <chaifix@163.com> | 2021-11-02 19:44:01 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-02 19:44:01 +0800 |
commit | 72812a7b47f90f9460e54e8149ba9199a7841244 (patch) | |
tree | 9ebdb4b65d7cbbc0a3d7c436a9b45d4eff351b62 /Runtime/GUI/Font.h | |
parent | b7511abf1a1f302b5c7ebf50faaf65b62d7bb6ed (diff) |
! Text mesh done
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); |