Changeset 769 for trunk/src/gui/text/qfontengine.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/text/qfontengine.cpp
r651 r769 358 358 } 359 359 } else { 360 positions.resize(glyphs.numGlyphs);361 glyphs_out.resize(glyphs.numGlyphs);362 int i = 0;363 360 while (i < glyphs.numGlyphs) { 364 361 if (!glyphs.attributes[i].dontPrint) { … … 383 380 } 384 381 382 void QFontEngine::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) 383 { 384 glyph_metrics_t gi = boundingBox(glyph); 385 bool isValid = gi.isValid(); 386 if (leftBearing != 0) 387 *leftBearing = isValid ? gi.x.toReal() : 0.0; 388 if (rightBearing != 0) 389 *rightBearing = isValid ? (gi.xoff - gi.x - gi.width).toReal() : 0.0; 390 } 385 391 386 392 glyph_metrics_t QFontEngine::tightBoundingBox(const QGlyphLayout &glyphs) … … 1389 1395 } 1390 1396 1397 void QFontEngineMulti::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing) 1398 { 1399 int which = highByte(glyph); 1400 engine(which)->getGlyphBearings(stripped(glyph), leftBearing, rightBearing); 1401 } 1402 1391 1403 void QFontEngineMulti::addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, 1392 1404 QPainterPath *path, QTextItem::RenderFlags flags)
Note:
See TracChangeset
for help on using the changeset viewer.