mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix pdf bugs (add build with embedded fonts in changes)
This commit is contained in:
@ -71,6 +71,19 @@ JSSmart<CJSValue> CDrawingFileEmbed::DestroyPixmap(JSSmart<CJSValue> typedArray)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JSSmart<CJSValue> CDrawingFileEmbed::GetFontBinary(JSSmart<CJSValue> Id)
|
||||
{
|
||||
if (0 != m_pFile->GetType())
|
||||
return NULL;
|
||||
|
||||
std::wstring sName = Id->toStringW();
|
||||
std::wstring sFile = m_pFile->GetFontBinaryNative(sName);
|
||||
if (sFile.empty())
|
||||
return NULL;
|
||||
|
||||
return CJSContext::createUint8Array(sFile);
|
||||
}
|
||||
|
||||
JSSmart<CJSValue> CDrawingFileEmbed::GetGlyphs(JSSmart<CJSValue> nPageIndex)
|
||||
{
|
||||
return WasmMemoryToJS(m_pFile->GetGlyphs(nPageIndex->toInt32()));
|
||||
|
||||
Reference in New Issue
Block a user