diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 19:46:56 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 19:46:56 +1000 |
commit | 809744c300d6bc3a4f5cb71a8a67dbad811fe2de (patch) | |
tree | 8eb5d92d3a608aef29ed43ef43c23d20bb35a987 /source/core/StarFont.cpp | |
parent | f73cb3ce03c35770605ce83a49906cc4825c00a6 (diff) |
Fix horizontal alignment with font, add new fonts
Diffstat (limited to 'source/core/StarFont.cpp')
-rw-r--r-- | source/core/StarFont.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/core/StarFont.cpp b/source/core/StarFont.cpp index 9c8636a..6adc4c3 100644 --- a/source/core/StarFont.cpp +++ b/source/core/StarFont.cpp @@ -86,7 +86,7 @@ unsigned Font::width(String::Char c) { } -std::pair<Image, int> Font::render(String::Char c) { +std::pair<Image, Vec2I> Font::render(String::Char c) { if (!m_fontImpl) throw FontException("Font::render called on uninitialized font."); @@ -117,7 +117,7 @@ std::pair<Image, int> Font::render(String::Char c) { } } - return { move(image), (slot->bitmap_top - (int)height) + m_pixelSize / 4 }; + return { move(image), {slot->bitmap_left, (slot->bitmap_top - (int)height) + m_pixelSize / 4} }; } } |