[Libreoffice-commits] core.git: drawinglayer/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 29 11:22:48 UTC 2020
drawinglayer/source/primitive2d/textlayoutdevice.cxx | 14 --------------
1 file changed, 14 deletions(-)
New commits:
commit 5a08034df97dd768b481fe999e81e80027774a5c
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 29 12:20:18 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Oct 29 12:22:13 2020 +0100
Revert "Revert "tdf#127471 Remove font width scaling hack""
This reverts commit f39e4b6b6f8aa8b4af22b6eb30a52e98cd5a6455.
Reason for revert: Breaks the build on Windows, see e.g.
<https://ci.libreoffice.org//job/lo_tb_master_win/28613/>
> C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/drawinglayer/source/primitive2d/textlayoutdevice.cxx(432): error C2065: 'bFontIsScaled': undeclared identifier
> C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/drawinglayer/source/primitive2d/textlayoutdevice.cxx(438): error C2065: 'nWidth': undeclared identifier
(<https://gerrit.libreoffice.org/c/core/+/104847/1> "Revert 'tdf#127471 Remove
font width scaling hack'" had trivially succeeded to build on Jenkins, as it was
base on the old 8891a2fc2a4bf86add68691b7ac167a07a8add84 "tdf#127471 Remove font
width scaling hack" which it reverted, rather than on recent master.)
Change-Id: I1060e5423f594894b15330ba6631a9af07a64634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104958
Tested-by: Stephan Bergmann <sbergman at redhat.com>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 0730dc397707..2820ebfbc03d 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -427,20 +427,6 @@ namespace drawinglayer::primitive2d
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