diff options
Diffstat (limited to 'src/gui/text/qfont_p.h')
-rw-r--r-- | src/gui/text/qfont_p.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 6165554388..b78d6692b4 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -228,22 +228,32 @@ public: void clear(); struct Key { - Key() : script(0), screen(0) { } - Key(const QFontDef &d, int c, int s = 0) - : def(d), script(c), screen(s) { } + Key() : script(0), multi(0), screen(0) { } + Key(const QFontDef &d, uchar c, bool m = 0, uchar s = 0) + : def(d), script(c), multi(m), screen(s) { } QFontDef def; - int script; - int screen; + uchar script; + uchar multi: 1; + uchar screen: 7; inline bool operator<(const Key &other) const { if (script != other.script) return script < other.script; if (screen != other.screen) return screen < other.screen; + if (multi != other.multi) return multi < other.multi; + if (multi && def.fallBackFamilies.size() != other.def.fallBackFamilies.size()) + return def.fallBackFamilies.size() < other.def.fallBackFamilies.size(); return def < other.def; } inline bool operator==(const Key &other) const - { return def == other.def && script == other.script && screen == other.screen; } + { + return script == other.script + && screen == other.screen + && multi == other.multi + && (!multi || def.fallBackFamilies.size() == other.def.fallBackFamilies.size()) + && def == other.def; + } }; // QFontEngineData cache |