Fix pdf bugs (add build with embedded fonts in changes)

This commit is contained in:
Oleg Korshul
2024-09-23 21:59:36 +03:00
parent b536d6eb41
commit a5c73127fd
8 changed files with 41 additions and 5 deletions

View File

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