diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-08-11 09:49:35 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-08-11 09:55:34 (GMT) |
commit | bb696453f6f87cad58982af3455335478fedb8cc (patch) | |
tree | 9357e1aec0915da47df6bec87336d4005d8e460f | |
parent | 02e0523fe2b1dfd08eadaf127023306f6aa64c6f (diff) | |
download | Qt-bb696453f6f87cad58982af3455335478fedb8cc.zip Qt-bb696453f6f87cad58982af3455335478fedb8cc.tar.gz Qt-bb696453f6f87cad58982af3455335478fedb8cc.tar.bz2 |
Disable minRightBearing optimization in QTextLayout on Mac
Neither of the Mac font engines have implemented minimum right bearing,
which will cause them to return 0 for the minimum value. This will
cause the right bearing to never be calculated prior to breaking
and thus never be a part of the breaking width. Since actually
implementing the functions is too time consuming for right now, we
will disable the optimization for the time being.
Reviewed-by: Olivier
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index da43913..7d5fa43 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1952,7 +1952,9 @@ void QTextLine::layout_helper(int maxGlyphs) // expand the text beyond the edge. if (sb_or_ws|breakany) { QFixed rightBearing = lbh.rightBearing; // store previous right bearing +#if !defined(Q_WS_MAC) if (lbh.calculateNewWidth(line) - lbh.minimumRightBearing > line.width) +#endif lbh.adjustRightBearing(); if (lbh.checkFullOtherwiseExtend(line)) { // we are too wide, fix right bearing |