From 809744c300d6bc3a4f5cb71a8a67dbad811fe2de Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Mon, 3 Jul 2023 19:46:56 +1000 Subject: Fix horizontal alignment with font, add new fonts --- source/core/StarFont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/core/StarFont.cpp') 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 Font::render(String::Char c) { +std::pair Font::render(String::Char c) { if (!m_fontImpl) throw FontException("Font::render called on uninitialized font."); @@ -117,7 +117,7 @@ std::pair 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} }; } } -- cgit v1.2.3