mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-06-28 02:51:10 +12:00
fix font crash
This commit is contained in:
parent
56ad15d8b0
commit
80512e657b
|
@ -10,7 +10,7 @@ async function subsetFont (fontPath, glyphs, options = {}) {
|
|||
let fontdata = Buffer.from(fontPath, 'binary')
|
||||
let type = fileType(fontdata)
|
||||
if (type && type.mime === 'font/ttf') {
|
||||
data = fontdata
|
||||
data = fontdata.buffer
|
||||
} else {
|
||||
if (!isNode || !options.local) {
|
||||
data = await fetch(fontPath, 'arraybuffer')
|
||||
|
|
Loading…
Reference in a new issue