Ignore:
Timestamp:
Oct 14, 2009, 2:32:13 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Changed to using the Freetype2 library for populating the fonts. Implemented font matching against populated fonts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/text/qfontdatabase.cpp

    r220 r222  
    5454#include <locale.h>
    5555#endif
    56 #ifdef Q_WS_PM
    57 #include "qt_os2.h"
    58 #endif
    5956
    6057#include <stdlib.h>
     
    148145                                uint yres = 0, uint avgwidth = 0, bool add = false);
    149146#endif // Q_WS_X11
    150 #ifdef Q_WS_QWS
     147#if defined(Q_WS_QWS) || defined(Q_WS_PM)
    151148    QByteArray fileName;
    152149    int fileIndex;
    153 #endif
    154 #ifdef Q_WS_PM
    155     unsigned short pointSize; // in deca-points
    156     LONG lMatch;
    157150#endif
    158151};
     
    219212        weightName = setwidthName = 0;
    220213#endif // Q_WS_X11
    221 #if defined(Q_WS_PM)
    222         faceName[0] = 0;
    223 #endif
    224214    }
    225215
     
    234224            free(pixelSizes[count].encodings);
    235225#endif
    236 #ifdef Q_WS_QWS
     226#if defined(Q_WS_QWS) || defined(Q_WS_PM)
    237227            pixelSizes[count].fileName.~QByteArray();
    238228#endif
     
    252242    const char *setwidthName;
    253243#endif // Q_WS_X11
    254 #ifdef Q_WS_QWS
     244#if defined(Q_WS_QWS) || defined(Q_WS_PM)
    255245    bool antialiased;
    256246#endif
    257 #ifdef Q_WS_PM
    258     CHAR faceName[FACESIZE];
    259 #endif
    260 
    261 #ifdef Q_WS_PM
    262     QtFontSize *pixelSize(unsigned short size, bool = false,
    263                           unsigned short pointSize = 0);
    264 #else
     247
    265248    QtFontSize *pixelSize(unsigned short size, bool = false);
    266 #endif
    267249};
    268250
     
    280262}
    281263
    282 #ifdef Q_WS_PM
    283 QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add,
    284                                    unsigned short pointSize)
    285 #else
    286264QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add)
    287 #endif
    288265{
    289266    for (int i = 0; i < count; i++) {
    290 #ifdef Q_WS_PM
    291         if (pixelSizes[i].pixelSize == size &&
    292         (size == SMOOTH_SCALABLE || !pointSize ||
    293          pixelSizes[i].pointSize == pointSize))
    294         return pixelSizes + i;
    295 #else
    296267        if (pixelSizes[i].pixelSize == size)
    297268            return pixelSizes + i;
    298 #endif
    299269    }
    300270    if (!add)
     
    310280    pixelSizes[count].encodings = 0;
    311281#endif
    312 #ifdef Q_WS_QWS
     282#if defined(Q_WS_QWS) || defined(Q_WS_PM)
    313283    new (&pixelSizes[count].fileName) QByteArray;
    314284    pixelSizes[count].fileIndex = 0;
    315 #endif
    316 #ifdef Q_WS_PM
    317     pixelSizes[count].pointSize = pointSize;
    318     pixelSizes[count].lMatch = 0;
    319285#endif
    320286    return pixelSizes + (count++);
     
    401367    {
    402368        memset(writingSystems, 0, sizeof(writingSystems));
    403 #ifdef Q_WS_PM
    404         // the concept of writing systems isn't used, let's support just Any
    405         writingSystems[QFontDatabase::Any] = Supported;
    406 #endif
    407369    }
    408370    ~QtFontFamily() {
Note: See TracChangeset for help on using the changeset viewer.