Kaydet (Commit) 843c6d6e authored tarafından Khaled Hosny's avatar Khaled Hosny

tdf#106960: Fix math scaling on Windows

Remove this leftoever code from 1b7e788e which
does nothing useful now.

Change-Id: Ia7fa888d5687c9da110b44139a8217558a7f641b
Reviewed-on: https://gerrit.libreoffice.org/36222Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 6b4a4bab
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment