summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qfont.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 4c57dff..bbd35f1 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1614,7 +1614,11 @@ bool QFont::operator==(const QFont &f) const
&& f.d->overline == d->overline
&& f.d->strikeOut == d->strikeOut
&& f.d->kerning == d->kerning
- && f.d->capital == d->capital));
+ && f.d->capital == d->capital
+ && f.d->letterSpacingIsAbsolute == d->letterSpacingIsAbsolute
+ && f.d->letterSpacing == d->letterSpacing
+ && f.d->wordSpacing == d->wordSpacing
+ ));
}
@@ -1648,6 +1652,10 @@ bool QFont::operator<(const QFont &f) const
#endif // Q_WS_X11
if (f.d->capital != d->capital) return f.d->capital < d->capital;
+ if (f.d->letterSpacingIsAbsolute != d->letterSpacingIsAbsolute) return f.d->letterSpacingIsAbsolute < d->letterSpacingIsAbsolute;
+ if (f.d->letterSpacing != d->letterSpacing) return f.d->letterSpacing < d->letterSpacing;
+ if (f.d->wordSpacing != d->wordSpacing) return f.d->wordSpacing < d->wordSpacing;
+
int f1attrs = (f.d->underline << 3) + (f.d->overline << 2) + (f.d->strikeOut<<1) + f.d->kerning;
int f2attrs = (d->underline << 3) + (d->overline << 2) + (d->strikeOut<<1) + d->kerning;
return f1attrs < f2attrs;