Changeset 57516 in webkit
- Timestamp:
- Apr 13, 2010 8:21:36 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57514 r57516 1 2010-04-13 Eskil Blomfeldt <eblomfel@trolltech.com>, Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] Use integer pixel metric QFont API to fix rounding errors in text rendering on the Mac 6 https://bugs.webkit.org/show_bug.cgi?id=36532 7 8 * platform/graphics/qt/FontQt.cpp: 9 (WebCore::Font::floatWidthForComplexText): 10 (WebCore::Font::font): 11 1 12 2010-04-13 Alexander Pavlov <apavlov@chromium.org> 2 13 -
trunk/WebCore/platform/graphics/qt/FontQt.cpp
r57215 r57516 183 183 QTextLayout layout(string, font()); 184 184 QTextLine line = setupLayout(&layout, run); 185 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) 186 int w = int(line.horizontalAdvance()); 187 #else 185 188 int w = int(line.naturalTextWidth()); 189 #endif 186 190 // WebKit expects us to ignore word spacing on the first character (as opposed to what Qt does) 187 191 if (treatAsSpace(run[0])) … … 224 228 if (m_wordSpacing != 0) 225 229 f.setWordSpacing(m_wordSpacing); 230 231 #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) 232 f.setStyleStrategy(QFont::ForceIntegerMetrics); 233 #endif 234 226 235 return f; 227 236 }
Note: See TracChangeset
for help on using the changeset viewer.