diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-20 23:35:28 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-21 09:01:38 +0000 |
commit | 064773ecc3bfba37c80c2f9c6fccde35395a57c0 (patch) | |
tree | 7566172262537550d9f522d393a659eb964ad3cc /vcl | |
parent | 8889ac2a1e956873f9d7357e2b3d066122ea64f4 (diff) |
tdf#104733: Don't ignore OpenType-CFF fons on Windows
This is a folloup for ef4b9032de55e6b1b182e4ead1bbe6e590df296e, turns
out TRUTYPE_FONTTYPE does not cover CFF fonts like I thought (the
fonts that I was checking were actually TTF fonts).
Reviewed-on: https://gerrit.libreoffice.org/32258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
(cherry picked from commit 72002992a3c5213882fa4d60c7cd8fab10f0b009)
Change-Id: I2d7b34b625aa03134421dc44a24e3c66be25df98
Reviewed-on: https://gerrit.libreoffice.org/32270
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index fd207a5db7bf..9de0541c2797 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1408,8 +1408,15 @@ int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, { // Only SFNT fonts are supported, ignore anything else. if (SalLayout::UseCommonLayout() || OpenGLWrapper::isVCLOpenGLEnabled()) - if (!(nFontType & TRUETYPE_FONTTYPE)) - return 1; + { + if (!(nFontType & TRUETYPE_FONTTYPE) && + !(pMetric->ntmTm.ntmFlags & NTM_PS_OPENTYPE) && + !(pMetric->ntmTm.ntmFlags & NTM_TT_OPENTYPE)) + { + SAL_INFO("vcl.gdi", "Unsupported font ignored: " << OUString(pLogFont->elfLogFont.lfFaceName)); + return 1; + } + } // Ignore non-device font on printer. if (pInfo->mbPrinter && !(nFontType & DEVICE_FONTTYPE)) |