From be8805be1e00b23ce2f6cc438e5cac0ab9342793 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 30 Nov 2016 22:15:01 +0100 Subject: [PATCH] fix(renderer): Draw under-/overline after glyph --- src/components/renderer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/renderer.cpp b/src/components/renderer.cpp index 963f69d0..951c763e 100644 --- a/src/components/renderer.cpp +++ b/src/components/renderer.cpp @@ -440,6 +440,9 @@ void renderer::draw_character(uint16_t character) { uint16_t ucs = ((character >> 8) | (character << 8)); draw_util::xcb_poly_text_16_patched(m_connection, m_pixmap, m_gcontexts.at(gc::FG), x, y, 1, &ucs); } + + fill_underline(x, width); + fill_overline(x, width); } /** @@ -491,6 +494,9 @@ void renderer::draw_textstring(const char* text, size_t len) { draw_util::xcb_poly_text_16_patched( m_connection, m_pixmap, m_gcontexts.at(gc::FG), x, y, chars.size(), chars.data()); } + + fill_underline(x, width); + fill_overline(x, width); } } @@ -598,9 +604,6 @@ int16_t renderer::shift_content(int16_t x, const int16_t shift_x) { m_currentx += shift_x; - fill_underline(x, shift_x); - fill_overline(x, shift_x); - return x; }