mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-02-28 17:37:46 +01:00
Better behaviour when font cant be loaded
This commit is contained in:
parent
cd981183b0
commit
1694d310a8
@ -1530,11 +1530,21 @@ void PDFPageContentProcessor::operatorTextSetFontAndFontSize(PDFOperandName font
|
||||
{
|
||||
if (m_fontDictionary->hasKey(fontName.name))
|
||||
{
|
||||
PDFFontPointer font = PDFFont::createFont(m_fontDictionary->get(fontName.name), m_document);
|
||||
try
|
||||
{
|
||||
PDFFontPointer font = PDFFont::createFont(m_fontDictionary->get(fontName.name), m_document);
|
||||
|
||||
m_graphicState.setTextFont(qMove(font));
|
||||
m_graphicState.setTextFontSize(fontSize);
|
||||
updateGraphicState();
|
||||
m_graphicState.setTextFont(qMove(font));
|
||||
m_graphicState.setTextFontSize(fontSize);
|
||||
updateGraphicState();
|
||||
}
|
||||
catch (PDFParserException)
|
||||
{
|
||||
m_graphicState.setTextFont(nullptr);
|
||||
m_graphicState.setTextFontSize(fontSize);
|
||||
updateGraphicState();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user