summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-08-19 06:05:46 +0200
committerAndras Timar <andras.timar@collabora.com>2020-09-09 11:58:09 +0200
commit4ad224f396ab04372c46e126d13da15623e4def4 (patch)
tree807baa2d635a965606374cf94c1926cd87b16336 /drawinglayer
parent14168b9f09a359b3500dd74f504c347b6268470e (diff)
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@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@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@CIB.de>
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 aa8faeaf47a1..299fea5d90a3 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))
{