summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-04-06 17:32:48 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2017-04-06 18:16:47 +0000
commit843c6d6eec95b99e867c28ab27860215d5d72b37 (patch)
treea6ff66cc9b6df401050f542980db82e2a1d32268 /vcl
parent6b4a4bab6d21a549ed35fd045eedf7ff05130a71 (diff)
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@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/salfont.cxx23
1 files changed, 0 insertions, 23 deletions
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 )
{