diff options
Diffstat (limited to 'Runtime/GUI/Font.cpp')
-rw-r--r-- | Runtime/GUI/Font.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Runtime/GUI/Font.cpp b/Runtime/GUI/Font.cpp index 67a2e3b..e5444f1 100644 --- a/Runtime/GUI/Font.cpp +++ b/Runtime/GUI/Font.cpp @@ -75,7 +75,7 @@ Font::Font(DataBuffer* db, TextGeneratingSettings settings) } } -Font::Font(DataBuffer* db, LuaBind::VM* vm, std::string path, TextGeneratingSettings settings) +Font::Font(LuaBind::VM* vm, DataBuffer* db, TextGeneratingSettings settings) : LuaBind::NativeClass<Font>(vm) { m_AtlasMargin = settings.margin; @@ -124,6 +124,15 @@ void Font::RenderCharacters(character::Codepoint* codepoint, int n, int pixelSiz } } +void Font::RenderCharacters(std::vector<character::Codepoint>& codepoint, int pixelSize) +{ + int n = codepoint.size(); + for (int i = 0; i < n; ++i) + { + RenderCharacter(codepoint[i], pixelSize); + } +} + void Font::RenderCharacter(character::Codepoint codepoint, int pixelSize) { character::Hash hash = GetHash(codepoint, pixelSize); |