+2007-06-21 Lars Knoll <lars@trolltech.com>
+
+ Reviewed by Simon.
+
+ another small fix for letter spacing
+
+ * platform/qt/FontQt.cpp:
+ (WebCore::generateComponents):
+
2007-06-21 Lars Knoll <lars@trolltech.com>
Reviewed by Simon.
}
offset += add + letterSpacing + font.spaceWidth();
start = 1;
+// qDebug() << "space at 0" << offset;
} else if (smallCaps) {
f = (QChar::category(run[0]) == QChar::Letter_Lowercase ? &font.scFont() : &font.font());
}
if (i - start > 0) {
components->append(TextRunComponent(run.characters() + start, i - start, f, offset, f == &font.scFont()));
offset += components->last().width + letterSpacing;
-// qDebug() << " appending(2) " << components->last().string << components->last().width;
+ qDebug() << " appending(2) " << components->last().string << components->last().width;
}
- f = (QChar::category(ch) == QChar::Letter_Lowercase ? &font.scFont() : &font.font());
+ if (smallCaps)
+ f = (QChar::category(ch) == QChar::Letter_Lowercase ? &font.scFont() : &font.font());
start = i;
}
if (run.length() - start > 0) {
offset += components->last().width;
// qDebug() << " appending(3) " << components->last().string << components->last().width;
}
- } else { //if (padding || m_wordSpacing) {
+ offset += letterSpacing;
+ } else {
int start = 0;
for (int i = 0; i < run.length(); ++i) {
if (Font::treatAsSpace(run[i])) {
Vector<TextRunComponent, 1024> components;
int w = generateComponents(&components, *this, run, style);
-// qDebug() << " width=" << w;
+ qDebug() << " width=" << w;
return w;
}