From 1f6f76beb97f8b5efe5f7b0d6d40f717f4cb5722 Mon Sep 17 00:00:00 2001 From: Andrzej Wolski Date: Fri, 22 Jun 2018 12:51:53 +0200 Subject: [PATCH] Fix overbar drawing for non-italic text Overbar was always indented inward, regardless if text was italic or not. --- common/gal/stroke_font.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index a6958f39c4..10cc9e2c1f 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -326,7 +326,9 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText ) if( !last_had_overbar ) { - overbar_start_x += overbar_italic_comp; + if( m_gal->IsFontItalic() ) + overbar_start_x += overbar_italic_comp; + last_had_overbar = true; }