summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2019-06-20 02:13:04 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2019-06-20 04:08:25 +0200
commit362b872305d3b3500ef6f0823e5d30433dcfe48e (patch)
treec9c40a4102762a785cc3d6c8e0cede4aa328eb8c
parent942de6a01ba990e5f3bc55ce4ab3737a03f67f39 (diff)
Remove leftover from bitmap fonts support on Windows
The condition "nFontType & RASTER_FONTTYPE" can never be true since we reject such fonts, so nHeight is always zero and we can simplify the code a bit accordingly. Change-Id: Ib3a19777909e16367c8168e86e474c1a5ee64a5b Reviewed-on: https://gerrit.libreoffice.org/74400 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
-rw-r--r--vcl/inc/win/salgdi.h2
-rw-r--r--vcl/win/gdi/salfont.cxx16
2 files changed, 5 insertions, 13 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 7dc859a1a551..23f201fea6fa 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -59,7 +59,7 @@ class WinFontFace : public PhysicalFontFace
{
public:
explicit WinFontFace( const FontAttributes&,
- int nFontHeight, BYTE eWinCharSet,
+ BYTE eWinCharSet,
BYTE nPitchAndFamily );
virtual ~WinFontFace() override;
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 181bbcec633b..fcdbb6484dda 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -559,16 +559,10 @@ static FontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont
static rtl::Reference<WinFontFace> ImplLogMetricToDevFontDataW( const ENUMLOGFONTEXW* pLogFont,
- const NEWTEXTMETRICW* pMetric,
- DWORD nFontType )
+ const NEWTEXTMETRICW* pMetric)
{
- int nHeight = 0;
- if ( nFontType & RASTER_FONTTYPE )
- nHeight = pMetric->tmHeight - pMetric->tmInternalLeading;
-
rtl::Reference<WinFontFace> pData = new WinFontFace(
WinFont2DevFontAttributes(*pLogFont, *pMetric),
- nHeight,
pLogFont->elfLogFont.lfCharSet,
pMetric->tmPitchAndFamily );
@@ -613,7 +607,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont )
}
WinFontFace::WinFontFace( const FontAttributes& rDFS,
- int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily )
+ BYTE eWinCharSet, BYTE nPitchAndFamily )
: PhysicalFontFace( rDFS ),
mnId( 0 ),
mbFontCapabilitiesRead( false ),
@@ -622,8 +616,6 @@ WinFontFace::WinFontFace( const FontAttributes& rDFS,
mbAliasSymbolsHigh( false ),
mbAliasSymbolsLow( false )
{
- SetBitmapSize( 0, nHeight );
-
if( eWinCharSet == SYMBOL_CHARSET )
{
if( (nPitchAndFamily & TMPF_TRUETYPE) != 0 )
@@ -1052,7 +1044,7 @@ static int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe,
return 1;
}
- rtl::Reference<WinFontFace> pData = ImplLogMetricToDevFontDataW( pLogFont, &(pMetric->ntmTm), nFontType );
+ rtl::Reference<WinFontFace> pData = ImplLogMetricToDevFontDataW(pLogFont, &(pMetric->ntmTm));
pData->SetFontId( sal_IntPtr( pInfo->mnFontCount++ ) );
pInfo->mpList->Add( pData.get() );
@@ -1222,7 +1214,7 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
aDFS.maMapName = aFontName;
*/
- rtl::Reference<WinFontFace> pFontData = new WinFontFace( aDFA, 0,
+ rtl::Reference<WinFontFace> pFontData = new WinFontFace(aDFA,
sal::static_int_cast<BYTE>(DEFAULT_CHARSET),
sal::static_int_cast<BYTE>(TMPF_VECTOR|TMPF_TRUETYPE) );
pFontData->SetFontId( reinterpret_cast<sal_IntPtr>(pFontData.get()) );