Kaydet (Commit) ef4b9032 authored tarafından Khaled Hosny's avatar Khaled Hosny

tdf#103514: Try harder to ignore non-SFNT fonts

It seems that Script (and probably other bitmap fonts) have zero
nFontType, so instead if checking for RASTER_FONTTYPE, check for not
TRUTYPE_FONTTYPE (which seems to cover both TrueType and CFF-based SFNT
fonts).

Change-Id: Ie39ed99b219b756885b13b3ecbf3616556a277db
Reviewed-on: https://gerrit.libreoffice.org/32031Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 48437052
...@@ -1054,16 +1054,8 @@ int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, ...@@ -1054,16 +1054,8 @@ int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe,
} }
else else
{ {
// Ignore non-device font on printer. // Only SFNT fonts are supported, ignore anything else.
if (pInfo->mbPrinter && !(nFontType & DEVICE_FONTTYPE)) if (!(nFontType & TRUETYPE_FONTTYPE))
return 1;
// Ignore non-scalable fonts.
if (nFontType & RASTER_FONTTYPE)
return 1;
// Ignore font formats we don’t support.
if ((pMetric->ntmTm.ntmFlags & NTM_TYPE1) || (pMetric->ntmTm.ntmFlags & NTM_MULTIPLEMASTER))
return 1; return 1;
WinFontFace* pData = ImplLogMetricToDevFontDataW( pLogFont, &(pMetric->ntmTm), nFontType ); WinFontFace* pData = ImplLogMetricToDevFontDataW( pLogFont, &(pMetric->ntmTm), nFontType );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment