Commit 7e2f9d83 authored by Christoph Feck's avatar Christoph Feck

Render text at primary font's baseline

This only addresses the vertical shift and cutoff of lower
parts of characters, but not horizontal shift (characters
moving to the left or right).

See the linked review request for details.

This commit is for the 17.04 version. If you can test master
builds, please add feedback.

REVIEW: 129281
CCBUG: 371687
parent e3109c19
......@@ -855,18 +855,10 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
// This still allows RTL characters to be rendered in the RTL way.
// the drawText(rect,flags,string) overload is used here with null flags
// instead of drawText(rect,string) because the (rect,string) overload causes
// the application's default layout direction to be used instead of
// the widget-specific layout direction, which should always be
// Qt::LeftToRight for this widget
// This was discussed in:
if (_bidiEnabled) {
painter.drawText(rect, 0, text);
painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), text);
} else {
// See bug 280896 for more info
painter.drawText(rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text);
painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), LTR_OVERRIDE_CHAR + text);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment