mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 22:01:45 +08:00
For bug 80007
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user