Open HarryPommier opened 3 years ago
Wouldn't it be more an issue of font? Like depending on the build process it's using different alternatives of fonts (between CSS declared fonts, fonts available in container and fonts available on system in browser and in PDF)
When checking the font actually used through the font info of the inspect tool of Firefox:
font-family: sans-serif;
)font-family: sans-serif;
)font-family: monospace;
)Result in evince: Result in Chrome PDF viewer: Result in GIMP:
Rendering is coherent in PDF viewers.
If I change the font declaration in sensei to use DejaVu Sans (Mono), or remove the declaration of @font-face
, the rendering becomes the same in Firefox than on PDF viewers.
Looks like CSS-declared fonts are lost during the PDF printing process...
All the screenshot look exactly the same to me :)
The original issue is about the font size being different: the word "sound" on the first bullet point is on the first line in the web view, and on the second line in the pdf. Might also not be a font size issue but a slide size issue.
@HarryPommier could you try reproducing the issue using the latest version of sensei?
@hgwood If you look closely, the boldness of the title is different between web view and PDF. Also in code bloc we can see that the first line is splitted in two lines in web view but not in PDF. So there is a difference of rendering between web and PDF.
Right, sorry!
When launching decktape with option --screenshot
, which is doing a screenshot from pupeeter page object, the screenshot result is the same as in the PDF viewers.
Also I suspect some of the effects are from image sizing and placement, which can be subtly different in PDF than in browser. But I think most of this issue is due to PDF printing process of decktape, and won't be easy to debug and fix...
Useful reading abour PDF, fonts and reader interpretation: https://linuxfr.org/users/pied/journaux/pdf-mais-que-fait-la-police
The font size is different between the slides generated with "sensei serve" and the slides generated with "sensei pdf" This may cause layout errors.
With "serve":
With "pdf"