diff --git a/Pdf4QtLibCore/sources/pdfblpainter.cpp b/Pdf4QtLibCore/sources/pdfblpainter.cpp index 567a076..a8b3e85 100644 --- a/Pdf4QtLibCore/sources/pdfblpainter.cpp +++ b/Pdf4QtLibCore/sources/pdfblpainter.cpp @@ -693,28 +693,9 @@ void PDFBLPaintEngine::drawPixmap(const QRectF& r, const QPixmap& pm, const QRec void PDFBLPaintEngine::drawTextItem(const QPointF& p, const QTextItem& textItem) { - if (m_currentRawFont.isValid()) - { - QString text = textItem.text(); - QList glyphIndices = m_currentRawFont.glyphIndexesForString(text); - QList glyphPositions = m_currentRawFont.advancesForGlyphIndexes(glyphIndices); - - QPointF currentPosition = p; - QPainterPath path; - for (int i = 0; i < glyphIndices.size(); ++i) - { - QPainterPath glyphPath = m_currentRawFont.pathForGlyph(glyphIndices[i]); - glyphPath.translate(currentPosition); - path.addPath(glyphPath); - currentPosition += glyphPositions[i]; - } - - m_blContext->save(); - setFillRule(path.fillRule()); - m_blContext->setFillStyle(BLRgba32(m_currentPen.color().rgba())); - drawPathImpl(path, false, true, true); - m_blContext->restore(); - } + // We will call the base implementation, which will + // create paths from text and draw these paths. + QPaintEngine::drawTextItem(p, textItem); } void PDFBLPaintEngine::drawTiledPixmap(const QRectF& r, const QPixmap& pixmap, const QPointF& s)