diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/PhysicalFontCollection.hxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx index 9c0c7a19ada2..fd9eb157ae51 100644 --- a/vcl/inc/PhysicalFontCollection.hxx +++ b/vcl/inc/PhysicalFontCollection.hxx @@ -35,7 +35,7 @@ private: mutable bool mbMatchData; // true if matching attributes are initialized bool mbMapNames; // true if MapNames are available - typedef boost::unordered_map<const OUString, PhysicalFontFamily*,FontNameHash> PhysicalFontFamilies; + typedef boost::unordered_map<const OUString, PhysicalFontFamily*,OUStringHash> PhysicalFontFamilies; PhysicalFontFamilies maPhysicalFontFamilies; ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index c1565f743b14..c82badd18ec5 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -770,16 +770,19 @@ size_t ImplFontCache::IFSD_Hash::operator()( const FontSelectPattern& rFSD ) con size_t FontSelectPatternAttributes::hashCode() const { // TODO: does it pay off to improve this hash function? - static FontNameHash aFontNameHash; - size_t nHash = aFontNameHash( maSearchName ); + size_t nHash; #if ENABLE_GRAPHITE // check for features and generate a unique hash if necessary if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX) != -1) { - nHash = aFontNameHash( maTargetName ); + nHash = maTargetName.hashCode(); } + else #endif + { + nHash = maSearchName.hashCode(); + } nHash += 11 * mnHeight; nHash += 19 * GetWeight(); nHash += 29 * GetSlant(); |