For bug 80007

This commit is contained in:
Svetlana Kulikova
2026-02-12 18:29:43 +03:00
parent 4f9c229f77
commit cf44441645
2 changed files with 2 additions and 5 deletions

View File

@ -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<PdfWriter::EFontType>(gfxFont->getType()), mCodeToWidth, mCodeToUnicode, mCodeToGID);
}
}

View File

@ -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;