diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qrawfont.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qtextengine_p.h | 1 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 61bc63e..7c7d4eb 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -238,7 +238,8 @@ void QRawFont::loadFromData(const QByteArray &fontData, If \a antialiasingType is set to QRawFont::SubPixelAntialiasing, then the resulting image will be in QImage::Format_RGB32 and the RGB values of each pixel will represent the subpixel opacities of the pixel in the rasterization of the glyph. Otherwise, the image will be in the format of - QImage::Format_A8 and each pixel will contain the opacity of the pixel in the rasterization. + QImage::Format_Indexed8 and each pixel will contain the opacity of the pixel in the + rasterization. \sa pathForGlyph(), QPainter::drawGlyphRun() */ diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index 067e81d..9362022 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -629,7 +629,6 @@ public: int lineNumberForTextPosition(int pos); int positionAfterVisualMovement(int oldPos, QTextCursor::MoveOperation op); void insertionPointsForLine(int lineNum, QVector<int> &insertionPoints); - void resetFontEngineCache(); private: diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 83c3676..d0c1a0e 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2507,6 +2507,9 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const int pos = *cursorPos; int itm; + const HB_CharAttributes *attributes = eng->attributes(); + while (pos < line.from + line.length && !attributes[pos].charStop) + pos++; if (pos == line.from + (int)line.length) { // end of line ensure we have the last item on the line itm = eng->findItem(pos-1); |