- Timestamp:
- Dec 2, 2009, 2:27:41 AM (15 years ago)
- Location:
- trunk/src/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/kernel/qapplication_pm.cpp
r364 r371 223 223 default: f.setStretch(QFont::Unstretched); break; 224 224 } 225 f.setFamily( fm.szFamilyname);225 f.setFamily(); 226 226 f.setPointSize(height); 227 227 } -
trunk/src/gui/text/qfont_pm.cpp
r226 r371 42 42 ****************************************************************************/ 43 43 44 44 45 #include "qfont.h" 45 46 #include "qfont_p.h" … … 69 70 break; 70 71 case QFont::AnyStyle: 71 if (request.fixedPitch) 72 default: 73 static char szFontName[FACESIZE + 1] = {0,}; 74 75 // already queried ? 76 if (szFontName[0] != ';') { 77 szFontName[0] = ';'; 78 // query the associated font 79 if (PrfQueryProfileString(HINI_USERPROFILE, 80 "PM_SystemFonts", "PM_AssociateFont", 0, 81 szFontName, sizeof(szFontName))) { 82 szFontName[FACESIZE] = '\0'; 83 84 // the format of the associated font is face_name;point_size 85 // so remove ';' and later 86 for (PSZ pch = szFontName; *pch; pch++) 87 if (*pch == ';') { 88 *pch = '\0'; 89 break; 90 } 91 } 92 } 93 94 // is the associated font available ? 95 if (szFontName[0] != '\0' && szFontName[0] != ';') 96 family = szFontName; 97 else if (request.fixedPitch) 72 98 family = "Courier"; 73 99 else … … 103 129 QString QFont::defaultFamily() const 104 130 { 105 return Q Latin1String(qt_fontFamilyFromStyleHint(d->request));131 return Q(qt_fontFamilyFromStyleHint(d->request)); 106 132 } 107 133 -
trunk/src/gui/text/qfontdatabase_pm.cpp
r319 r371 42 42 ****************************************************************************/ 43 43 44 45 44 46 #include "qabstractfileengine.h" 45 46 #include "qfontengine_pm_p.h"47 48 47 #include "qsettings.h" 49 48 #include "qfileinfo.h" 50 49 #include "qdatetime.h" 51 50 #include "qhash.h" 51 52 52 53 53 #include <ft2build.h> … … 56 56 #include FT_TRUETYPE_TABLES_H 57 57 #include FT_LCD_FILTER_H 58 59 58 60 59 61 QT_BEGIN_NAMESPACE … … 119 121 static FontFileHash knownFontFiles; 120 122 static bool knownFontFilesInitialized = false; 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 173 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 121 288 122 289 static void populateDatabase(const QString& fam) … … 270 437 271 438 cached.index = idx; 272 cached.familyName = QString::fromLatin1(face->family_name); 439 440 if (!lookupFamilyName(face, cached.familyName)) 441 cached.familyName = QString::fromLocal8Bit(face->family_name); 273 442 274 443 // familyName may contain extra spaces (at least this is true for
Note:
See TracChangeset
for help on using the changeset viewer.