|
@@ -84,7 +84,9 @@ function ComPDFKitDownloadFontA(index){
|
|
|
if (index === 0) {
|
|
|
return ComPDFKitJS.opened_Font[index];
|
|
|
}
|
|
|
- fontFile = readFileAsync('./fonts/' + fontsJson[index - 1].filePath)
|
|
|
+ const font = fontsJson[index - 1]
|
|
|
+ fontFile = readFileAsync('./fonts/' + font.filePath)
|
|
|
+ CPDFWorker.MessageHandler.send('LoadFont', { fontFamily: font.family })
|
|
|
return fontFile
|
|
|
}
|
|
|
|
|
@@ -155,6 +157,10 @@ class CPDFWorker {
|
|
|
ComPDFKitJS.opened_Font[0] = data.fileList
|
|
|
}
|
|
|
|
|
|
+ if (data.defaultFont) {
|
|
|
+ ComPDFKitJS.opened_DefFont[0] = data.defaultFont
|
|
|
+ }
|
|
|
+
|
|
|
fontsJson = data.fontsJson
|
|
|
|
|
|
Module._InitComPDFkitFont()
|