diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx index ab9ad877059a..ea6d9fca7ffb 100644 --- a/include/vcl/glyphitemcache.hxx +++ b/include/vcl/glyphitemcache.hxx @@ -71,6 +71,8 @@ private: tools::Long logicWidth; VclPtr outputDevice; vcl::Font font; + double fontScaleX; + double fontScaleY; MapMode mapMode; bool rtl; vcl::text::ComplexTextLayoutFlags layoutMode; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index bf4985622fad..ea14e3d018b7 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1192,8 +1192,9 @@ public: //If bNewFontLists is true then drop and refetch lists of system fonts SAL_DLLPRIVATE static void ImplUpdateAllFontData( bool bNewFontLists ); -protected: SAL_DLLPRIVATE const LogicalFontInstance* GetFontInstance() const; + +protected: SAL_DLLPRIVATE tools::Long GetEmphasisAscent() const { return mnEmphasisAscent; } SAL_DLLPRIVATE tools::Long GetEmphasisDescent() const { return mnEmphasisDescent; } diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index 09acbae46150..93f70a853a74 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -364,6 +364,9 @@ SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(const VclPtrGetLayoutMode()) , digitLanguage(outputDevice->GetDigitLanguage()) { + const LogicalFontInstance* fi = outputDevice->GetFontInstance(); + fi->GetScale(&fontScaleX, &fontScaleY); + hashValue = 0; o3tl::hash_combine(hashValue, vcl::text::FirstCharsStringHash()(text)); o3tl::hash_combine(hashValue, index); @@ -371,7 +374,13 @@ SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(const VclPtr