diff --git a/PdfFile/PdfEditor.cpp b/PdfFile/PdfEditor.cpp index 6a4cc6b5d1..38d4a90286 100644 --- a/PdfFile/PdfEditor.cpp +++ b/PdfFile/PdfEditor.cpp @@ -4381,10 +4381,7 @@ void CPdfEditor::ScanAndProcessFonts(PDFDoc* pPDFDocument, XRef* xref, Dict* pRe if (pFontEntry.pCodeToGID[nIndex]) mCodeToGID[nIndex] = pFontEntry.pCodeToGID[nIndex]; } - bool bBold = false, bItalic = false; - std::wstring wsCheckFontName = wsFontName; - PdfReader::CheckFontStylePDF(wsCheckFontName, bBold, bItalic); - m_pWriter->AddFont(L"Embedded: " + wsFontName, bBold, bItalic, wsFileName, 0); + m_pWriter->AddFont(L"Embedded: " + wsFontName, false, false, wsFileName, 0); m_pWriter->GetDocument()->CreateFontEmbedded(wsFileName, 0, sFontKey, static_cast(gfxFont->getType()), mCodeToWidth, mCodeToUnicode, mCodeToGID); } } diff --git a/PdfFile/PdfWriter.cpp b/PdfFile/PdfWriter.cpp index 1c3af64ed4..357a8f7940 100644 --- a/PdfFile/PdfWriter.cpp +++ b/PdfFile/PdfWriter.cpp @@ -3623,7 +3623,7 @@ bool CPdfWriter::GetEmbeddedFont(const std::wstring& wsFontName) { std::wstring wsFontPath = m_oFont.GetPath(); LONG lFaceIndex = m_oFont.GetFaceIndex(); - if (!FindFontPath(wsFontName, m_oFont.IsBold(), m_oFont.IsItalic(), wsFontPath, lFaceIndex)) + if (!FindFontPath(wsFontName, false, false, wsFontPath, lFaceIndex)) return false; if (m_bSplit) return false;