summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-07-19 14:01:41 +0000
committerKurt Zenker <kz@openoffice.org>2006-07-19 14:01:41 +0000
commit4f3765e9c647dd76bc459bcc731033285f5b812e (patch)
treeaf4339801460789fe546c614c83a3954852c1cda /vcl/win
parentb49076070c899798c21a64142e044071818fb648 (diff)
INTEGRATION: CWS vcl61 (1.80.28); FILE MERGED
2006/07/06 09:22:56 hdu 1.80.28.1: #i61271# when displaying huge fonts we have to disable font scaling
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 1761896b575b..84b62baae350 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: salgdi3.cxx,v $
*
- * $Revision: 1.80 $
+ * $Revision: 1.81 $
*
- * last change: $Author: hr $ $Date: 2006-06-20 12:02:32 $
+ * last change: $Author: kz $ $Date: 2006-07-19 15:01:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1067,8 +1067,8 @@ void ImplGetLogFontFromFontSelect( HDC hDC,
}
rLogFont.lfWeight = ImplWeightToWin( pFont->meWeight );
- rLogFont.lfHeight = (int)-pFont->mnHeight;
- rLogFont.lfWidth = (int)pFont->mnWidth;
+ rLogFont.lfHeight = (LONG)-pFont->mnHeight;
+ rLogFont.lfWidth = (LONG)pFont->mnWidth;
rLogFont.lfUnderline = 0;
rLogFont.lfStrikeOut = 0;
rLogFont.lfItalic = (pFont->meItalic) != ITALIC_NONE;
@@ -1141,8 +1141,8 @@ static void ImplGetLogFontFromFontSelect( HDC hDC,
}
rLogFont.lfWeight = ImplWeightToWin( pFont->meWeight );
- rLogFont.lfHeight = (int)-pFont->mnHeight;
- rLogFont.lfWidth = (int)pFont->mnWidth;
+ rLogFont.lfHeight = (LONG)-pFont->mnHeight;
+ rLogFont.lfWidth = (LONG)pFont->mnWidth;
rLogFont.lfUnderline = 0;
rLogFont.lfStrikeOut = 0;
rLogFont.lfItalic = (pFont->meItalic) != ITALIC_NONE;
@@ -1194,9 +1194,9 @@ USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
// release no longer referenced font handles
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
{
- if( mhFonts[i] )
- ::DeleteFont( mhFonts[i] );
- mhFonts[ i ] = 0;
+ if( mhFonts[i] )
+ ::DeleteFont( mhFonts[i] );
+ mhFonts[ i ] = 0;
}
mhDefFont = 0;
return 0;
@@ -1239,7 +1239,7 @@ USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
{
mfFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
aLogFont.lfHeight = -MAXFONTHEIGHT;
- aLogFont.lfWidth = static_cast<int>( aLogFont.lfWidth / mfFontScale );
+ aLogFont.lfWidth = static_cast<LONG>( aLogFont.lfWidth / mfFontScale );
}
hNewFont = ::CreateFontIndirectW( &aLogFont );
@@ -1286,7 +1286,7 @@ USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
&& (stricmp( aLogFont.lfFaceName, "Courier" ) == 0) )
strncpy( aLogFont.lfFaceName, "Courier New", 11 );
- // limit font requests to MAXFONTHEIGHT
+ // limit font requests to MAXFONTHEIGHT to work around driver problems
// TODO: share MAXFONTHEIGHT font instance
if( -aLogFont.lfHeight <= MAXFONTHEIGHT )
mfFontScale = 1.0;
@@ -1294,7 +1294,7 @@ USHORT WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel )
{
mfFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
aLogFont.lfHeight = -MAXFONTHEIGHT;
- aLogFont.lfWidth = static_cast<int>( aLogFont.lfWidth / mfFontScale );
+ aLogFont.lfWidth = static_cast<LONG>( aLogFont.lfWidth / mfFontScale );
}
hNewFont = ::CreateFontIndirectA( &aLogFont );
@@ -2373,8 +2373,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
if( rB2DPolyPoly.count() )
{
::basegfx::B2DHomMatrix aMatrix;
- aMatrix.scale( 1.0/256, 1.0/256 );
- aMatrix.scale( mfFontScale, mfFontScale );
+ aMatrix.scale( mfFontScale/256, mfFontScale/256 );
rB2DPolyPoly.transform( aMatrix );
}