Bugfix - select standard font if no font is matched

This commit is contained in:
Jakub Melka 2020-07-09 11:52:42 +02:00
parent 3bf14c0c93
commit b784646969
1 changed files with 6 additions and 0 deletions

View File

@ -252,6 +252,12 @@ QByteArray PDFSystemFontInfoStorage::loadFont(const FontDescriptor* descriptor,
ReleaseDC(NULL, hdc);
#endif
if (result.isEmpty() && standardFontType == StandardFontType::Invalid)
{
reporter->reportRenderError(RenderErrorType::Warning, PDFTranslationContext::tr("Inexact font substitution: font %1 replaced by standard font Times New Roman.").arg(fontName));
result = loadFont(descriptor, StandardFontType::TimesRoman, reporter);
}
return result;
}