diff options
author | chai <chaifix@163.com> | 2021-11-03 18:52:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-03 18:52:30 +0800 |
commit | 08ddd44b634d4da78edd0964f539a310544c7883 (patch) | |
tree | 108317d9138c3e8a19f3cc3f2ffcfba4768f22d5 /Runtime/GUI/Font.h | |
parent | 6f62a3d5ad405dbab5ac031fb8eeb03bdb395904 (diff) |
! UI9Slicing
Diffstat (limited to 'Runtime/GUI/Font.h')
-rw-r--r-- | Runtime/GUI/Font.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Runtime/GUI/Font.h b/Runtime/GUI/Font.h index 067a364..5fbe981 100644 --- a/Runtime/GUI/Font.h +++ b/Runtime/GUI/Font.h @@ -24,15 +24,15 @@ struct Character { namespace character { #if GAMELAB_WIN - typedef unsigned short Codepoint; // unicode Codepoint(BMP,U+0000至U+FFFF) + typedef unsigned short Unicode; // unicode codepoint(BMP,U+0000至U+FFFF) #else - typedef unsigned int Codepoint; // unicode Codepoint(BMP,U+0000至U+FFFF) + typedef unsigned int Unicode; // unicode codepoint(BMP,U+0000至U+FFFF) #endif union Hash { unsigned int hashCode; struct { - Codepoint codepoint; + Unicode codepoint; unsigned short size;//字体大小 }; bool operator==(const Hash &other) const @@ -44,7 +44,7 @@ namespace character struct UnicodeString { - character::Codepoint* str; + character::Unicode* str; int length; }; @@ -104,13 +104,13 @@ public: Font(DataBuffer* db, TextGeneratingSettings setting)/*throw FontException*/; Font(LuaBind::VM* vm, DataBuffer* db, TextGeneratingSettings setting)/*throw FontException*/; - const Character* GetCharacter(character::Codepoint codepoint, int pixelSize); + const Character* GetCharacter(character::Unicode codepoint, int pixelSize); const GlyphAtals* GetGlyphAtlas(int index); // pre-bake - bool RenderCharacter(character::Codepoint codepoint, int pixelSize); - void RenderCharacters(character::Codepoint* codepoint, int n, int pixelSize); - void RenderCharacters(std::vector<character::Codepoint>& codepoint, int pixelSize); + bool RenderCharacter(character::Unicode codepoint, int pixelSize); + void RenderCharacters(character::Unicode* codepoint, int n, int pixelSize); + void RenderCharacters(std::vector<character::Unicode>& codepoint, int pixelSize); GET(Vector2, AtlasSize, m_AtlasSize); @@ -119,7 +119,7 @@ private: GlyphAtals* RequestAtlas(int pixelSize, Vector2 preferSize); Rect GetRenderChartAndMove(GlyphAtals* atlas, Vector2 preferSize); bool HasEnoughSpace(GlyphAtals* atlas, Vector2 preferSize); - character::Hash GetHash(character::Codepoint Codepoint, int pixelSize); + character::Hash GetHash(character::Unicode Unicode, int pixelSize); //------------------------------------------------------------------------- |