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/qfontengine_win.cpp

    r651 r769  
    4040****************************************************************************/
    4141
     42#if _WIN32_WINNT < 0x0500
     43#undef _WIN32_WINNT
     44#define _WIN32_WINNT 0x0500
     45#endif
     46
    4247#include "qfontengine_p.h"
    4348#include "qtextengine_p.h"
     
    650655static const int char_table_entries = sizeof(char_table)/sizeof(ushort);
    651656
     657#ifndef Q_CC_MINGW
     658void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
     659{
     660    HDC hdc = shared_dc();
     661    SelectObject(hdc, hfont);
     662
     663#ifndef Q_WS_WINCE
     664    if (ttf)
     665#endif
     666
     667    {
     668        ABC abcWidths;
     669        GetCharABCWidthsI(hdc, glyph, 1, 0, &abcWidths);
     670        if (leftBearing)
     671            *leftBearing = abcWidths.abcA;
     672        if (rightBearing)
     673            *rightBearing = abcWidths.abcC;
     674    }
     675
     676#ifndef Q_WS_WINCE
     677    else {
     678        QFontEngine::getGlyphBearings(glyph, leftBearing, rightBearing);
     679    }
     680#endif
     681}
     682#endif // Q_CC_MINGW
    652683
    653684qreal QFontEngineWin::minLeftBearing() const
Note: See TracChangeset for help on using the changeset viewer.