equal
deleted
inserted
replaced
5771 QFont f = engine.font(si); |
5771 QFont f = engine.font(si); |
5772 QTextItemInt gf(si, &f); |
5772 QTextItemInt gf(si, &f); |
5773 gf.glyphs = engine.shapedGlyphs(&si); |
5773 gf.glyphs = engine.shapedGlyphs(&si); |
5774 gf.chars = engine.layoutData->string.unicode() + si.position; |
5774 gf.chars = engine.layoutData->string.unicode() + si.position; |
5775 gf.num_chars = engine.length(item); |
5775 gf.num_chars = engine.length(item); |
5776 gf.width = si.width; |
5776 if (engine.forceJustification) { |
|
5777 for (int j=0; j<gf.glyphs.numGlyphs; ++j) |
|
5778 gf.width += gf.glyphs.effectiveAdvance(j); |
|
5779 } else { |
|
5780 gf.width = si.width; |
|
5781 } |
5777 gf.logClusters = engine.logClusters(&si); |
5782 gf.logClusters = engine.logClusters(&si); |
5778 |
5783 |
5779 drawTextItem(QPointF(x.toReal(), p.y()), gf); |
5784 drawTextItem(QPointF(x.toReal(), p.y()), gf); |
5780 |
5785 |
5781 x += si.width; |
5786 x += gf.width; |
5782 } |
5787 } |
5783 } |
5788 } |
5784 |
5789 |
5785 void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br) |
5790 void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br) |
5786 { |
5791 { |