diff options
author | Khaled Hosny <khaled@libreofice.org> | 2023-07-10 09:49:38 +0000 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-07-10 15:45:31 +0200 |
commit | 88d72b44a1a9345e7eacdd707cecfb300517df9c (patch) | |
tree | d0606d4c086a4eed4c6669effd3992c7f1707e46 /vcl | |
parent | a389e6bd7aacfa4e1ff1ea3a46199fb381d1131f (diff) |
Drop unused WinFontInstance scale
Unsed since:
commit 7cb3e475f2fb0162c7290414509de4fb8fe57e30
Author: Jan-Marek Glogowski <glogow@fbihome.de>
Date: Thu Sep 6 14:04:25 2018 +0200
WIN add SalGraphics* to WinFontInstance
Change-Id: I7d14f2efce04c919cffee612b09833810ff3f78b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154240
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/win/winlayout.hxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 11 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 1 |
3 files changed, 4 insertions, 10 deletions
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index fb8e5a1c6e43..07c80e8e8b39 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -43,7 +43,6 @@ public: WinSalGraphics* GetGraphics() const { return m_pGraphics; } HFONT GetHFONT() const { return m_hFont; } - float GetScale() const { return m_fScale; } // Return true if the font is for vertical writing. // I.e. the font name of the LOGFONT is prefixed with '@'. bool IsCJKVerticalFont() const { return m_bIsCJKVerticalFont; } @@ -64,7 +63,6 @@ private: WinSalGraphics *m_pGraphics; HFONT m_hFont; - float m_fScale; bool m_bIsCJKVerticalFont; sal_Int32 m_nTmDescent; mutable sal::systools::COMReference<IDWriteFontFace> mxDWFontFace; diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index f4a3029a454f..3b31028c88bb 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -867,7 +867,7 @@ void WinSalGraphics::GetFontMetric( FontMetricDataRef& rxFontMetric, int nFallba rxFontMetric->SetSlant( 0 ); // transformation dependent font metrics - rxFontMetric->SetWidth(static_cast<int>(pFontInstance->GetScale() * aWinMetric.tmAveCharWidth)); + rxFontMetric->SetWidth(aWinMetric.tmAveCharWidth); } FontCharMapRef WinSalGraphics::GetFontCharMap() const @@ -1167,7 +1167,6 @@ bool WinFontInstance::ImplGetGlyphBoundRect(sal_GlyphId nId, tools::Rectangle& r const ::comphelper::ScopeGuard aFontRestoreScopeGuard([hFont, hOrigFont, hDC]() { if (hFont != hOrigFont) SelectObject(hDC, hOrigFont); }); - const float fFontScale = GetScale(); // use unity matrix MAT2 aMat; @@ -1202,10 +1201,8 @@ bool WinFontInstance::ImplGetGlyphBoundRect(sal_GlyphId nId, tools::Rectangle& r rRect = tools::Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ), Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) ); - rRect.SetLeft(static_cast<int>( fFontScale * rRect.Left() )); - rRect.SetRight(static_cast<int>( fFontScale * rRect.Right() ) + 1); - rRect.SetTop(static_cast<int>( fFontScale * rRect.Top() )); - rRect.SetBottom(static_cast<int>( fFontScale * rRect.Bottom() ) + 1); + rRect.SetRight(rRect.Right() + 1); + rRect.SetBottom(rRect.Bottom() + 1); return true; } @@ -1389,7 +1386,7 @@ bool WinFontInstance::GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon& // rescaling needed for the tools::PolyPolygon conversion if( rB2DPolyPoly.count() ) { - const double fFactor(GetScale()/256); + const double fFactor(1.0f/256); rB2DPolyPoly.transform(basegfx::utils::createScaleB2DHomMatrix(fFactor, fFactor)); } diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 371bdeb9642e..5081456aaaef 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -135,7 +135,6 @@ WinFontInstance::WinFontInstance(const WinFontFace& rPFF, const vcl::font::FontS : LogicalFontInstance(rPFF, rFSP) , m_pGraphics(nullptr) , m_hFont(nullptr) - , m_fScale(1.0f) , m_bIsCJKVerticalFont(false) , m_nTmDescent(0) { |