diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-21 21:00:21 -0700 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-22 11:16:12 +0000 |
commit | 2148c853b0d0deea92b97a810950f4d9f0cbb152 (patch) | |
tree | b3be84649176bdbaad13b2e8c753cf7119578de7 /vcl/win | |
parent | fdd96da1253092317dff68cbc6fb11a7e71834c1 (diff) |
Simplify CommonSalLayout constructor on Windows
We can use GDI to load the font tables after all, no need for all the
complications to use DirectWrite to load them. Should also make it work on
Windows XP (untested).
Change-Id: Id49fc524e6da983d76669a078f8b7d624f955703
Reviewed-on: https://gerrit.libreoffice.org/30156
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 18 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
2 files changed, 1 insertions, 19 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 44580ff2f83d..956459b79ece 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1062,24 +1062,6 @@ void WinFontFace::ReadCmapTable( HDC hDC ) const } } -sal_uLong WinSalGraphics::GetTable( const char pTagName[5], const unsigned char*& pResBuffer, void*& pTableContext, IDWriteFontFace*& pIDFace ) -{ - if( !pIDFace ) - return 0; - const void* pResBuf; - UINT32 nSize; - BOOL bExists; - HRESULT hr = S_OK; - const DWORD nTableTag = DWRITE_MAKE_OPENTYPE_TAG( pTagName[0], pTagName[1], pTagName[2], pTagName[3] ); - hr = pIDFace->TryGetFontTable( nTableTag, &pResBuf, &nSize, &pTableContext, &bExists ); - if( SUCCEEDED( hr ) && ( bExists ) ) - { - pResBuffer = static_cast<const unsigned char*>(pResBuf); - return static_cast<sal_uLong>(nSize); - } - return 0; -} - void WinFontFace::GetFontCapabilities( HDC hDC ) const { // read this only once per font diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 476248ee6ab1..d82f86daa401 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -3828,7 +3828,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe if (SalLayout::UseCommonLayout()) { - return new CommonSalLayout(this, rFontInstance, rFontFace); + return new CommonSalLayout(getHDC(), rFontInstance, rFontFace); } else { |