mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Bugfix - select standard font if no font is matched
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user