[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - drawinglayer/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 8 08:21:55 UTC 2020


 drawinglayer/source/primitive2d/textlayoutdevice.cxx |   14 --------------
 1 file changed, 14 deletions(-)

New commits:
commit 60309df3a1d1643a20c29c6d8ea187894e6c45c0
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Aug 19 06:05:46 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Sep 8 10:21:22 2020 +0200

    tdf#127471 Remove font width scaling hack
    
    Which causes distorted fonts in certain cases (see bug report).
    
    Fix was suggested by Ilhan Yesil at https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6
    
    Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit b9306c4f721d3833296af144ac07dc2a064d1975)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102129
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 9d07e1683d2f..1278f794590c 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -409,20 +409,6 @@ namespace drawinglayer
             aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
             aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, false));
 
-#ifdef _WIN32
-            // for WIN32 systems, correct the FontWidth if FontScaling is used
-            if(bFontIsScaled && nHeight > 0)
-            {
-                const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
-
-                if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
-                {
-                    const double fScaleFactor(static_cast<double>(nWidth) / static_cast<double>(nHeight));
-                    const sal_uInt32 nScaledWidth(basegfx::fround(static_cast<double>(aUnscaledFontMetric.GetAverageFontWidth()) * fScaleFactor));
-                    aRetval.SetAverageFontWidth(nScaledWidth);
-                }
-            }
-#endif
             // handle FontRotation (if defined)
             if(!basegfx::fTools::equalZero(fFontRotation))
             {


More information about the Libreoffice-commits mailing list