astefanutti / decktape

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

strong tag produces glitch on Windows 10 #123

Closed DanielRuf closed 6 years ago

DanielRuf commented 6 years ago

When using reveal.js and there is a strong tag in a text the rendering is weird (first letter looks a bit bold, rest doesn't

How it should look like bold

How it actually looks like in the PDF image

When not using the strong tag it looks like this image

astefanutti commented 6 years ago

I haven't been able to reproduce. Would you be able to share a minimal use case? It may be specific to the font you use.

DanielRuf commented 6 years ago

Take a look at https://github.com/danielruf/slides

Basically I created a slide with reveal.js and used the strong tag in an unorderef list element.

DanielRuf commented 6 years ago

The font is the one loaded by the light reveal.js theme.

astefanutti commented 6 years ago

Still could not reproduce. Here is the result PDF: test.pdf.

Could you indicate what DeckTape version you use, as well as your OS, the PDF viewer. If you could upload an example PDF that may help as well.

DanielRuf commented 6 years ago

I've used Windows 10. The lockfile is committed. npm start will generate the pdf. I can also test on my MacBook at work tomorrow. The pdf was viewed in Adobe Acrobat Reader.

DanielRuf commented 6 years ago

slides.pdf

astefanutti commented 6 years ago

Thanks. That discards the viewer as I can see the issue using Mac OS viewer. It's unlikely to be an old DeckTape version issue as you use version 2.4.3. That would help if you could share the source of that sample so that I try reproducing.

DanielRuf commented 6 years ago

It's a normal <section> with a <ul> and a <li><strong>Encryption</strong><br>...</li>.

The font files and so on are in my slides repository. The only difference is that I've added an unordered list with a list item which contains a strong.

It's a bit late now but if you need this simple example source I'll provide this as a single html file tomorrow.

Using my repo and adding a section with the aforementioned code should reproduce this.

astefanutti commented 6 years ago

Unfortunately that's what I've tried, taking your repository and add the section to produce the sample I've attached.

DanielRuf commented 6 years ago

I can not reproduce it on macOS 10.12. So it seems it is a Windows related issue.

astefanutti commented 6 years ago

I've just tried on Windows 7 and still cannot reproduce: test.pdf.

So it seems specific to Windows 10. Unfortunately I don't have a Windows 10 image readily available to troubleshoot the issue.

mdreier-sap commented 6 years ago

I have encountered the same issue, with a slideshow based on remark.

Windows 10 remark 0.14.1 decktape 2.6.1

astefanutti commented 6 years ago

I suspect it is caused by the font compression logic that's somehow broken specifically on Windows 10. I have to find a Windows 10 box and I'll troubleshoot it ASAP.

DanielRuf commented 6 years ago

You can use maybe the virtual machines from modern.ie.

astefanutti commented 6 years ago

It should be fixed in version 2.6.2.

It turns out the PDF font name does not include the font sub family on Windows 10 compared to other platforms. The font sub family is now read, among other information, from the decoded font metadata.

astefanutti commented 6 years ago

And thanks for the report!

mdreier-sap commented 6 years ago

I upgraded to 2.6.3 and can confirm that this issue is resolved. Thank you!

astefanutti commented 6 years ago

@mwd-sap thanks for the confirmation. Appreciated!