diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-20 15:41:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-21 21:28:01 +0200 |
commit | 2f97ae5def2e51cfec3240fa625ffd495288360e (patch) | |
tree | 27d49dc19288c21254023bc784618de5a3e3a6bf /vcl/win | |
parent | 3a6f510c3e3bc269b2816cd6cca57f81eb7c4ae3 (diff) |
use LogicalFontInstance with SalGraphics
Change-Id: I66fb1ff4b2fdcc211e0a9d5831f6dcc5e564e789
Reviewed-on: https://gerrit.libreoffice.org/59372
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index c471c0c3be1f..c4970b0ce9b4 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -845,7 +845,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, } } -HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const * i_pFont, +HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, float& o_rFontScale, HFONT& o_rOldFont) @@ -860,7 +860,7 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const * i_pFont, hdcScreen = GetDC(nullptr); LOGFONTW aLogFont; - ImplGetLogFontFromFontSelect( getHDC(), i_pFont, i_pFontFace, aLogFont ); + ImplGetLogFontFromFontSelect( getHDC(), &i_rFont, i_pFontFace, aLogFont ); // #i47675# limit font requests to MAXFONTHEIGHT // TODO: share MAXFONTHEIGHT font instance @@ -912,7 +912,7 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const * i_pFont, return hNewFont; } -void WinSalGraphics::SetFont( const FontSelectPattern* pFont, int nFallbackLevel ) +void WinSalGraphics::SetFont(LogicalFontInstance* pFont, int nFallbackLevel) { // return early if there is no new font if( !pFont ) @@ -939,10 +939,10 @@ void WinSalGraphics::SetFont( const FontSelectPattern* pFont, int nFallbackLevel // WinSalGraphics::GetEmbedFontData does not set mpFontInstance // since it is interested in font file data only. - mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<WinFontInstance*>( pFont->mpFontInstance.get() ); + mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<WinFontInstance*>(pFont); HFONT hOldFont = nullptr; - HFONT hNewFont = ImplDoSetFont(pFont, nullptr, mfFontScale[ nFallbackLevel ], hOldFont); + HFONT hNewFont = ImplDoSetFont(pFont->GetFontSelectPattern(), nullptr, mfFontScale[ nFallbackLevel ], hOldFont); mfCurrentFontScale = mfFontScale[nFallbackLevel]; if( !mhDefFont ) @@ -1659,7 +1659,7 @@ bool WinSalGraphics::CreateFontSubset( const OUString& rToFile, ScopedFont aOldFont(*this); float fScale = 1.0; HFONT hOldFont = nullptr; - ImplDoSetFont(&aIFSD, pFont, fScale, hOldFont); + ImplDoSetFont(aIFSD, pFont, fScale, hOldFont); WinFontFace const * pWinFontData = static_cast<WinFontFace const *>(pFont); @@ -1780,7 +1780,7 @@ const void* WinSalGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long float fScale = 0.0; HFONT hOldFont = nullptr; - ImplDoSetFont(&aIFSD, pFont, fScale, hOldFont); + ImplDoSetFont(aIFSD, pFont, fScale, hOldFont); // get the raw font file data RawFontData aRawFontData( getHDC() ); @@ -1811,7 +1811,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont, float fScale = 0.0; HFONT hOldFont = nullptr; - ImplDoSetFont(&aIFSD, pFont, fScale, hOldFont); + ImplDoSetFont(aIFSD, pFont, fScale, hOldFont); // get raw font file data const RawFontData xRawFontData( getHDC() ); |