From 12dcfc191bc258b51f5d00f46ea44a6a1c6fda91 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 28 Apr 2022 08:38:17 +0200 Subject: include LogicalFontInstance font scale in SalLayoutGlyphsCache key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason it may differ even if vcl::Font is the same. Without this ScExportTest2::testTdf66668 fails. Change-Id: I728a0848ac0420ce0d746134c7072f6ab59f2761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133537 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- vcl/source/gdi/impglyphitem.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'vcl') 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