Changeset 220
- Timestamp:
- Oct 12, 2009, 11:37:39 PM (16 years ago)
- Location:
- trunk/src/gui/text
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/text/qfontdatabase.cpp
r124 r220 54 54 #include <locale.h> 55 55 #endif 56 57 58 59 56 60 #include <stdlib.h> 57 61 #include <limits.h> … … 74 78 # define for if(0){}else for 75 79 #endif 80 81 76 82 77 83 QT_BEGIN_NAMESPACE … … 146 152 int fileIndex; 147 153 #endif 154 155 156 157 148 158 }; 149 159 … … 209 219 weightName = setwidthName = 0; 210 220 #endif // Q_WS_X11 221 222 223 211 224 } 212 225 … … 242 255 bool antialiased; 243 256 #endif 244 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 245 265 QtFontSize *pixelSize(unsigned short size, bool = false); 266 246 267 }; 247 268 … … 259 280 } 260 281 282 283 284 285 261 286 QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add) 287 262 288 { 263 289 for (int i = 0; i < count; i++) { 290 291 292 293 294 295 264 296 if (pixelSizes[i].pixelSize == size) 265 297 return pixelSizes + i; 298 266 299 } 267 300 if (!add) … … 280 313 new (&pixelSizes[count].fileName) QByteArray; 281 314 pixelSizes[count].fileIndex = 0; 315 316 317 318 282 319 #endif 283 320 return pixelSizes + (count++); … … 364 401 { 365 402 memset(writingSystems, 0, sizeof(writingSystems)); 403 404 405 406 366 407 } 367 408 ~QtFontFamily() { … … 867 908 } 868 909 869 #define SMOOTH_SCALABLE 0xffff870 871 910 QT_BEGIN_INCLUDE_NAMESPACE 872 911 #if defined(Q_WS_X11) -
trunk/src/gui/text/qfontdatabase_pm.cpp
r125 r220 48 48 QT_BEGIN_NAMESPACE 49 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 50 173 static void initializeDb() 51 174 { 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 52 219 // @todo implement 53 220 } 54 221 55 static inline void load(const QString &family = QString(), int = -1) 56 { 57 // @todo implement 58 } 59 60 static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt) 61 { 62 // @todo implement 222 static QFontEngine *loadPM(const QFontPrivate *d, int script, const QFontDef &req) 223 { 224 // @todo initializeDb() and stuff, get the engine 225 QFontDef fd = req; 226 QFontEngine *fe = new QFontEnginePMFT(fd); 227 return fe; 63 228 } 64 229 … … 95 260 fe->fontDef = req; 96 261 } else { 97 // @todo initializeDb() and stuff, get the engine 98 QFontDef fd = req; 99 fe = new QFontEnginePMFT(fd); 262 QMutexLocker locker(fontDatabaseMutex()); 263 if (!privateDb()->count) 264 initializeDb(); 265 fe = loadPM(d, script, req); 100 266 } 101 267 if (!fe) { -
trunk/src/gui/text/text.pri
r125 r220 189 189 contains(QT_CONFIG, fontconfig) { 190 190 CONFIG += opentype 191 192 191 193 } 192 194
Note:
See TracChangeset
for help on using the changeset viewer.