diff --git a/src/gui/Font.h b/src/gui/Font.h index 62c101e..2590246 100644 --- a/src/gui/Font.h +++ b/src/gui/Font.h @@ -12,6 +12,7 @@ public: std::shared_ptr get_glyph(FT_ULong character); int get_advance() { return m_advance; } int get_line_height() { return m_line_height; } + int get_baseline_offset() { return m_baseline_offset; } protected: bool preload_glyphs(); diff --git a/src/gui/Window.cc b/src/gui/Window.cc index 9ed7225..4cceedc 100644 --- a/src/gui/Window.cc +++ b/src/gui/Window.cc @@ -298,7 +298,7 @@ void Window::redraw() { uint8_t c = piece->start[i]; auto g = m_font.get_glyph(c); - m_shaders.text->set_position(x, y); + m_shaders.text->set_position(x, y + m_font.get_baseline_offset()); g->render(); if ((i + 1) % m_columns == 0) {