astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.19k stars 176 forks source link

font creation problem #236

Closed srl295 closed 2 years ago

srl295 commented 3 years ago

Font.create returns null/undefined here: https://github.com/astefanutti/decktape/blob/2e788961f7460930df32990183ca6f050a4bb595/decktape.js#L448-L451

Printing slide #66      ( 66/132) ...TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at fontMetadataKey (/Users/srl295/src/srl295-slides/node_modules/decktape/decktape.js:462:19)
    at parseFont (/Users/srl295/src/srl295-slides/node_modules/decktape/decktape.js:426:77)
    at Array.forEach (<anonymous>)
    at parseResources (/Users/srl295/src/srl295-slides/node_modules/decktape/decktape.js:387:45)
    at printSlide (/Users/srl295/src/srl295-slides/node_modules/decktape/decktape.js:378:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

It's slide 66 of this

srl295 commented 3 years ago

char in question is a monospace snowman

srl295 commented 3 years ago

Markdown:

Hello, World☃

### `Hello, World☃`
srl295 commented 3 years ago

Huh… making it a non monospace snowman 'fixed' it:

### `Hello, World`☃

Hello, World

astefanutti commented 2 years ago

It should be fixed with c4914a4cbe49acbf9e9ffd794bbb58d909ada640, that’s available in the latest 3.4.0 release.