Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qfontmetrics.cpp

    r651 r769  
    6464                           int tabStops, int *tabArray, int tabArrayLen,
    6565                           QPainter *painter);
    66 extern int qt_defaultDpi();
     66Q_GUI_EXPORT extern int qt_defaultDpi();
    6767
    6868/*****************************************************************************
     
    473473    engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0);
    474474    // ### can nglyphs != 1 happen at all? Not currently I think
    475     glyph_metrics_t gi = engine->boundingBox(glyphs.glyphs[0]);
    476     return qRound(gi.x);
     475    qreal lb;
     476    engine->getGlyphBearings(glyphs.glyphs[0], &lb);
     477    return qRound(lb);
    477478}
    478479
     
    507508    engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0);
    508509    // ### can nglyphs != 1 happen at all? Not currently I think
    509     glyph_metrics_t gi = engine->boundingBox(glyphs.glyphs[0]);
    510     return qRound(gi.xoff - gi.x - gi.width);
     510    qreal rb;
     511    engine->getGlyphBearings(glyphs.glyphs[0], 0, &rb);
     512    return qRound(rb);
    511513}
    512514
     
    13181320    engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0);
    13191321    // ### can nglyphs != 1 happen at all? Not currently I think
    1320     glyph_metrics_t gi = engine->boundingBox(glyphs.glyphs[0]);
    1321     return gi.x.toReal();
     1322    qreal lb;
     1323    engine->getGlyphBearings(glyphs.glyphs[0], &lb);
     1324    return lb;
    13221325}
    13231326
     
    13521355    engine->stringToCMap(&ch, 1, &glyphs, &nglyphs, 0);
    13531356    // ### can nglyphs != 1 happen at all? Not currently I think
    1354     glyph_metrics_t gi = engine->boundingBox(glyphs.glyphs[0]);
    1355     return (gi.xoff - gi.x - gi.width).toReal();
     1357    qreal rb;
     1358    engine->getGlyphBearings(glyphs.glyphs[0], 0, &rb);
     1359    return rb;
     1360
    13561361}
    13571362
Note: See TracChangeset for help on using the changeset viewer.