-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Read ttf table data error at 2.11.0
#202
Comments
Thanks for the report. It's likely related to the Would you be able to share a presentation so that we can reproduce? |
Yes. It will take about two days. :) |
I found the point where the problem occurs. If I remove index.html:
user.js
package.json:
|
2.10.0 works for me, but 2.11.0 throws the same error as in the title. I wish I could help more, but I am not very familiar with JS to debug the problem. |
This still seems to be a problem. Any news? I downgraded to 2.10 to work around the problem for now. |
We are currently working on #201, that may move us away from |
In my case, the same error was caused because I had emojis on the slide. I removed the emojis and I was able to generate a PDF. |
@peterj thanks for the feedback. That seems indeed related to emoji support. Could you confirm you still face the issue with version 3.0.0? |
@astefanutti yes, still repros with 3.0.0. Here's the full stack trace:
|
@peterj ok, thanks. I’ll work on it ASAP. |
Working around this issue might not be easy as 2.10 comes with dead dependencies. Might be useful if someone stuck on this: |
One alternative is to use the 2.10.0 container image. I still need to find some time to analyse the issue. Otherwise, I'll consider downgrading the fonteditor-core dependency. |
I had a similar error message with decktape 3.2.0. By just starting the Chromium browser on its own an authorization request was made to use the Chromium Safe Storage in the Mac Keychain. Deleting this Chromium Safe Storage entry in the keychain (used to store passwords) resolved it for me. |
This still happens for me. Here the presentation: |
The problem occurs reliably with Helvetica Neue, perhaps the specific ttf distributed with macOS. This in a presentation suffices to trigger the problem:
(I discovered this by trying to include https://www.tmwr.org/premade/modeling-process.svg in a presentation.) |
Similar to @kcarnold. When including Helvetica Neue in an SVG image, it crashes every time. Switching to an alternative font (Montserrat in my case) the problem goes away. |
As far as I can see, and that is not much, the problem is the fonteditor-core which might not handle the "Helvetica Neue" because it is a .ttc and not a .ttf. |
Well, it is definitely a ttc problem. The question is, how to fix it? Anybody willing and able to do something in this direction? A (maybe) helpful tester is here and stands up! ;-) |
@NMarkgraf thanks for the analysis. Ideally fonteditor-core would provide support for parsing font collection files. Alternatively, it may be possible to do the extraction to single font just before calling fonteditor-core. Another alternative might be to use another font library, like https://github.com/foliojs/fontkit, that supports .ttc files already. |
Well, I asked for support for changing fonteditor-core on GitHub, but .... The real problem is, that on Apple macOS the font "Helvetica Neue" (for example) is a system font, which can not be removed or disabled, so you just can not unpack the ttc-files and uses them separately. :-( So maybe fontkit is the way to fix this all, but I am not a JS programmer and don't know how the implement this in decktape. :-( |
Decktape reads the fonts from the PDF stream returned by Puppeteer, directly in memory. I've just given it a deeper look, and it turns out the font written in the PDF, in the Helvetica Neue case, does not have a cmap table, which prevent fonteditor-core (or any other libraries I've tested, e.g., fontkit, opentype.js) from being able to parse it. My current understanding is that the root cause lies in Puppeteer > Chromium > Skia. In the meantime, I've created #278 as a work-around, that simply skips font compression for such ill-formed fonts. |
Thank you very much for you support! |
Above example, decktape latest version
2.11.0
is used.But When I fix the decktape version to
2.10.0
, it works well.The text was updated successfully, but these errors were encountered: