Skip to content

Commit b37cca5

Browse files
committed
[Qt] Remove unnecessary QFontInfo use
1 parent c452826 commit b37cca5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

qt/src/hocr/HOCRPdfExporter.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,12 @@ HOCRPoDoFoPdfPrinter* HOCRPoDoFoPdfPrinter::create(const QString& filename, cons
472472
return nullptr;
473473
}
474474

475-
QFontInfo finfo(defaultFont);
476-
477475
// Attempt to load the default/fallback font to ensure it is valid
478476
try {
479477
#if PODOFO_VERSION >= PODOFO_MAKE_VERSION(0, 10, 0)
480-
defaultPdfFont = document->GetFonts().SearchFont(finfo.family().toStdString());
478+
defaultPdfFont = document->GetFonts().SearchFont(defaultFont.family().toStdString());
481479
#else
482-
defaultPdfFont = document->CreateFontSubset(finfo.family().toLocal8Bit().data(), false, false, false, pdfFontEncoding);
480+
defaultPdfFont = document->CreateFontSubset(defaultFont.family().toLocal8Bit().data(), false, false, false, pdfFontEncoding);
483481
#endif
484482
} catch (PoDoFo::PdfError&) {
485483
}

0 commit comments

Comments
 (0)