mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix bug 75101
This commit is contained in:
@ -43,6 +43,7 @@
|
||||
#include "../lib/xpdf/Stream.h"
|
||||
#include "../lib/xpdf/PDFDoc.h"
|
||||
#include "../lib/xpdf/CharCodeToUnicode.h"
|
||||
#include "../lib/xpdf/TextString.h"
|
||||
#include "XmlUtils.h"
|
||||
|
||||
#include "../../DesktopEditor/graphics/pro/Graphics.h"
|
||||
@ -724,6 +725,12 @@ namespace PdfReader
|
||||
oDictItem.free();
|
||||
|
||||
oFontDescriptor.dictLookup("FontFamily", &oDictItem);
|
||||
if (oDictItem.isString())
|
||||
{
|
||||
TextString* s = new TextString(oDictItem.getString());
|
||||
oFontSelect.wsAltName = new std::wstring(NSStringExt::CConverter::GetUnicodeFromUTF32(s->getUnicode(), s->getLength()));
|
||||
delete s;
|
||||
}
|
||||
oDictItem.free();
|
||||
|
||||
oFontDescriptor.dictLookup("FontStretch", &oDictItem);
|
||||
@ -2485,6 +2492,7 @@ namespace PdfReader
|
||||
unsigned int lUnicode = (unsigned int)wsUnicodeText[0];
|
||||
long lStyle;
|
||||
m_pRenderer->get_FontStyle(&lStyle);
|
||||
m_pFontManager->SetStringGID(FALSE);
|
||||
m_pFontManager->LoadFontFromFile(sFontPath, 0, dOldSize, 72, 72);
|
||||
|
||||
NSFonts::IFontFile* pFontFile = m_pFontManager->GetFile();
|
||||
@ -2521,6 +2529,7 @@ namespace PdfReader
|
||||
return;
|
||||
}
|
||||
m_pRenderer->put_FontPath(wsFileName);
|
||||
m_pFontManager->LoadFontFromFile(wsFileName, 0, dOldSize, 72, 72);
|
||||
bReplace = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user