mirror of https://github.com/JakubMelka/PDF4QT.git
Bugfix - select standard font if no font is matched
This commit is contained in:
parent
3bf14c0c93
commit
b784646969
|
@ -252,6 +252,12 @@ QByteArray PDFSystemFontInfoStorage::loadFont(const FontDescriptor* descriptor,
|
||||||
ReleaseDC(NULL, hdc);
|
ReleaseDC(NULL, hdc);
|
||||||
#endif
|
#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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue