[Development] right-to-left mode on Mac

René J. V. Bertin rjvbertin at gmail.com
Wed Jun 28 10:38:18 CEST 2017

Thiago Macieira wrote:

>> Shortcut hints are displayed as "C" instead of "C"
> That looks like a Unicode BiDi issue. The  symbol is in the private use area,
> so it has no BiDi flow, but "C" does.

Note (to self): Konsole does the following to force QPainter::drawText to do L2R 
rendering; will probably work for the shortcut rendering too.

// we use this to force QPainter to display text in LTR mode
// more information can be found in: http://unicode.org/reports/tr9/
const QChar LTR_OVERRIDE_CHAR(0x202D);

if (_bidiEnabled) {
  painter.drawText(rect.x(), rect.y() + _fontAscent + _lineSpacing, text);
} else {
  painter.drawText(rect.x(), rect.y() + _fontAscent + _lineSpacing,
                   LTR_OVERRIDE_CHAR + text);


More information about the Development mailing list