summaryrefslogtreecommitdiff
path: root/Runtime/GUI/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/GUI/Font.cpp')
-rw-r--r--Runtime/GUI/Font.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Runtime/GUI/Font.cpp b/Runtime/GUI/Font.cpp
index 8a5acea..1993126 100644
--- a/Runtime/GUI/Font.cpp
+++ b/Runtime/GUI/Font.cpp
@@ -16,7 +16,7 @@ using namespace character;
static std::string s_FontError;
static std::vector<unsigned char> s_PixelBuffer;
-static int s_SizePerPixel = sizeof(unsigned char);
+static const int s_SizePerPixel = sizeof(unsigned char);
Font::Font(std::string path, TextGeneratingSettings settings)
: LuaBind::NativeClass<Font>()
@@ -98,7 +98,7 @@ Font::Font(LuaBind::VM* vm, DataBuffer* db, TextGeneratingSettings settings)
}
}
-character::Hash Font::GetHash(Codepoint codepoint, int pixelSize)
+character::Hash Font::GetHash(Unicode codepoint, int pixelSize)
{
character::Hash hash;
hash.codepoint = codepoint;
@@ -106,7 +106,7 @@ character::Hash Font::GetHash(Codepoint codepoint, int pixelSize)
return hash;
}
-const Character* Font::GetCharacter(character::Codepoint codepoint, int pixelSize)
+const Character* Font::GetCharacter(character::Unicode codepoint, int pixelSize)
{
character::Hash hash = GetHash(codepoint, pixelSize);
auto iter = m_Characters.find(hash);
@@ -125,7 +125,7 @@ const Character* Font::GetCharacter(character::Codepoint codepoint, int pixelSiz
return &iter->second;
}
-void Font::RenderCharacters(character::Codepoint* codepoint, int n, int pixelSize)
+void Font::RenderCharacters(character::Unicode* codepoint, int n, int pixelSize)
{
for (int i = 0; i < n; ++i)
{
@@ -133,7 +133,7 @@ void Font::RenderCharacters(character::Codepoint* codepoint, int n, int pixelSiz
}
}
-void Font::RenderCharacters(std::vector<character::Codepoint>& codepoint, int pixelSize)
+void Font::RenderCharacters(std::vector<character::Unicode>& codepoint, int pixelSize)
{
int n = codepoint.size();
for (int i = 0; i < n; ++i)
@@ -142,7 +142,7 @@ void Font::RenderCharacters(std::vector<character::Codepoint>& codepoint, int pi
}
}
-bool Font::RenderCharacter(character::Codepoint codepoint, int pixelSize)
+bool Font::RenderCharacter(character::Unicode codepoint, int pixelSize)
{
character::Hash hash = GetHash(codepoint, pixelSize);
if (m_Characters.count(hash) != 0)
@@ -318,7 +318,7 @@ bool Font::HasEnoughSpace(GlyphAtals* atlas, Internal::Vector2 preferSize)
return false;
}
-Character GetCharacter(character::Codepoint Codepoint, int pixelSize)
+Character GetCharacter(character::Unicode Unicode, int pixelSize)
{
return Character();
}