[Libreoffice-commits] core.git: vcl/win
Khaled Hosny
khaledhosny at eglug.org
Thu Apr 6 18:17:16 UTC 2017
vcl/win/gdi/salfont.cxx | 23 -----------------------
1 file changed, 23 deletions(-)
New commits:
commit 843c6d6eec95b99e867c28ab27860215d5d72b37
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Thu Apr 6 17:32:48 2017 +0200
tdf#106960: Fix math scaling on Windows
Remove this leftoever code from 1b7e788eb3bf9cbe56ed5cc4a3fa7fa5e70ac40a which
does nothing useful now.
Change-Id: Ia7fa888d5687c9da110b44139a8217558a7f641b
Reviewed-on: https://gerrit.libreoffice.org/36222
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index a66ef8fafc76..1dc45bc1e7ea 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -55,8 +55,6 @@
using namespace vcl;
-static const int MAXFONTHEIGHT = 2048;
-
inline FIXED FixedFromDouble( double d )
{
@@ -830,7 +828,6 @@ void ImplGetLogFontFromFontSelect( HDC hDC,
HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern* i_pFont, HFONT& o_rOldFont)
{
- float fFontScale;
HFONT hNewFont = nullptr;
HDC hdcScreen = nullptr;
@@ -841,26 +838,6 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern* i_pFont, HFONT& o_rOldFon
LOGFONTW aLogFont;
ImplGetLogFontFromFontSelect( getHDC(), i_pFont, aLogFont, true );
- // #i47675# limit font requests to MAXFONTHEIGHT
- // TODO: share MAXFONTHEIGHT font instance
- if( (-aLogFont.lfHeight <= MAXFONTHEIGHT)
- && (+aLogFont.lfWidth <= MAXFONTHEIGHT) )
- {
- fFontScale = 1.0;
- }
- else if( -aLogFont.lfHeight >= +aLogFont.lfWidth )
- {
- fFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
- aLogFont.lfHeight = -MAXFONTHEIGHT;
- aLogFont.lfWidth = FRound( aLogFont.lfWidth / fFontScale );
- }
- else // #i95867# also limit font widths
- {
- fFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
- aLogFont.lfWidth = +MAXFONTHEIGHT;
- aLogFont.lfHeight = FRound( aLogFont.lfHeight / fFontScale );
- }
-
hNewFont = ::CreateFontIndirectW( &aLogFont );
if( hdcScreen )
{
More information about the Libreoffice-commits
mailing list