summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-29 12:20:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-10-29 12:22:13 +0100
commit5a08034df97dd768b481fe999e81e80027774a5c (patch)
tree27cf5e8accfe76dabc996e5713168165ff7e0b1e /drawinglayer
parent86026711b10484753aa0f84f89986db9bbf34c9e (diff)
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@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx14
1 files changed, 0 insertions, 14 deletions
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))
{