diff options
-rw-r--r-- | vcl/source/glyphs/glyphcache.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index ab56853dcf65..ea696f3bf7f9 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -150,9 +150,11 @@ bool GlyphCache::IFSD_Equal::operator()( const ImplFontSelectData& rA, const Imp // NOTE: ignoring meFamily deliberately // compare with the requested width, allow default width - if( (rA.mnWidth != rB.mnWidth) - && ((rA.mnHeight != rB.mnWidth) || (rA.mnWidth != 0)) ) + int nAWidth = rA.mnWidth != 0 ? rA.mnWidth : rA.mnHeight; + int nBWidth = rB.mnWidth != 0 ? rB.mnWidth : rB.mnHeight; + if( nAWidth != nBWidth ) return false; + #ifdef ENABLE_GRAPHITE if (rA.meLanguage != rB.meLanguage) return false; |