diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-25 02:25:08 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-25 23:37:48 +0200 |
commit | 48304cb5b4d8df71463837e2e48aa7c4d9594df9 (patch) | |
tree | b2c8c8c09e482ec799e08b07c26911727cf26a63 /vcl/win/gdi | |
parent | 50cbc6fbe8fd107d69d2897755021265af463386 (diff) |
Skip font formats not supported by CommonSalLayout
Don’t list fonts we can’t handle, bad things would happen…
Change-Id: Ic88486e34da69090deb3e8c394cb75a8e4e5cbd0
Diffstat (limited to 'vcl/win/gdi')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 956459b79ece..7f11d658a40a 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1532,6 +1532,15 @@ int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, if( (nFontType & RASTER_FONTTYPE) && !(nFontType & DEVICE_FONTTYPE) ) return 1; + // Ignore font formats not supported by CommonSalLayout. + if (SalLayout::UseCommonLayout()) + if ((nFontType & RASTER_FONTTYPE)) + { + SAL_INFO("vcl.fonts", "Ignoring font with unsupported format: " + << OUString(reinterpret_cast<const sal_Unicode*>(pLogFont->elfLogFont.lfFaceName))); + return 1; + } + WinFontFace* pData = ImplLogMetricToDevFontDataW( pLogFont, &(pMetric->ntmTm), nFontType ); pData->SetFontId( sal_IntPtr( pInfo->mnFontCount++ ) ); |