You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently discovered DeckTape and really appreciate that I can now create PDF slides from Asciidoctor / reveal.js files from the command line :-)
My biggest concerns are internal links (#49) - that would really help - and this font-related bug for which I could not find an issue yet.
Bug Description
When generating a PDF with the decktape Docker container from reveal.js slides, fonts do not work properly:
The font in the PDF does not look like Arial or Helvetica or sans-serif (defined as font-family).
Titles are not bold in the PDF (but they are in the HTML file)
Acrobat Reader (on Windows) reports:
Cannot extract the embedded font 'AAAAAA+WenQuanYiZenHei'. Some characters may not display or print correctly.
The problems also occur without custom CSS:
The default reveal.js theme defines Source Sans Pro, Helvetica, sans-serif as font-family.
Now Acrobat reader complains about the font BAAAAA+SourceSansPro-Regular.
The HTML file was created with Asciidoctor reveal.js, but that should not matter.
It also includes FontAwesome to enable the use of icons.
Strange Behaviour
Strangely, some minor changes in the Asciidoc file removed the Acrobat Reader error message (for example, replacing some words by others!).
I cannot reproduce this right now, but the effect was definitely there. It made me try a lot of changes in the document before finding a more stable workaround (see below)...
If it would help, I might be able to find a combination that changes the behaviour in Acrobat Reader. But I guess the root problem is not really related to that.
That fixes the problems as you can see in fontbug-workaround.pdf. That file is created with the container image ghcr.io/thomas-ferchau/decktape:pr-1 which includes this modification in a fork of decktape.
The workaround does not work without custom CSS - in that case, Acrobat Reader complains about the reveal.js default font: BAAAAA+SourceSansPro-Regular.
If I understand it correctly, /etc/fonts/conf.d/74-wqy-zenhei.conf defines to prefer its fonts which might cause the problem.
The text was updated successfully, but these errors were encountered:
I'm also getting this error in Acrobat Reader when opening a PDF that was created by decktape from a revealjs presentation. The revealjs presentation was created with Quarto.
And here's the content of the qmd document to create the revealjs HTML file. I'm not including the html file because it has too many external dependencies.
Curiously, the font error doesn't occur when I remove the subtitle, or if I shorten it to just the word "Analysis". Acrobat actually lists the font too:
But still shows the message: "Cannot extract the embedded font 'BAAAAA+SourceSansPro-Regular'. Some characters may not display or print correctly." when opening the PDF.
Other PDF readers work: I've tried Preview and Chrome on Mac, and Edge on Windows.
Versions:
decktape 3.12.0
Quarto 1.5.30
macOS 14.4.1
Acrobat Reader 2024.002.20759
I have recently discovered DeckTape and really appreciate that I can now create PDF slides from Asciidoctor / reveal.js files from the command line :-)
My biggest concerns are internal links (#49) - that would really help - and this font-related bug for which I could not find an issue yet.
Bug Description
When generating a PDF with the decktape Docker container from reveal.js slides, fonts do not work properly:
The font in the PDF does not look like Arial or Helvetica or sans-serif (defined as
font-family
).Titles are not bold in the PDF (but they are in the HTML file)
Acrobat Reader (on Windows) reports:
Cannot extract the embedded font 'AAAAAA+WenQuanYiZenHei'. Some characters may not display or print correctly.
The problems also occur without custom CSS:
The default reveal.js theme defines Source Sans Pro, Helvetica, sans-serif as
font-family
.Now Acrobat reader complains about the font BAAAAA+SourceSansPro-Regular.
Example Files
You can download example PDF and HTML files that show the problem and the results with the workaround applied (see below).
Versions and more Details
Decktape image:
astefanutti/decktape:3.12.0
Asciidoctor image:
asciidoctor/docker-asciidoctor:1.69.0
Acrobat Reader version (Windows):
24.001.20643
The HTML file was created with Asciidoctor reveal.js, but that should not matter.
It also includes FontAwesome to enable the use of icons.
Strange Behaviour
Strangely, some minor changes in the Asciidoc file removed the Acrobat Reader error message (for example, replacing some words by others!).
I cannot reproduce this right now, but the effect was definitely there. It made me try a lot of changes in the document before finding a more stable workaround (see below)...
If it would help, I might be able to find a combination that changes the behaviour in Acrobat Reader. But I guess the root problem is not really related to that.
Reproduce the Bug
Clone my reproducer repository, follow the setup instructions, and run the following commands:
This produces the following files:
fontbug.html
pdf/fontbug.pdf
(with the problems)pdf/fontbug-workaround.pdf
(problems fixed by workaround, see below).Workaround
I found a workaround in removing
wqy-zenhei
fromDockerfile
:Replace these lines...
...with this...
...as done in this commit.
That fixes the problems as you can see in
fontbug-workaround.pdf
. That file is created with the container imageghcr.io/thomas-ferchau/decktape:pr-1
which includes this modification in a fork of decktape.The workaround does not work without custom CSS - in that case, Acrobat Reader complains about the reveal.js default font: BAAAAA+SourceSansPro-Regular.
If I understand it correctly,
/etc/fonts/conf.d/74-wqy-zenhei.conf
defines to prefer its fonts which might cause the problem.The text was updated successfully, but these errors were encountered: