Open danwos opened 1 year ago
For me, it looks like this:
One small idea - could we add a WIN build GitHub workflow to this repository?
One small idea - could we add a WIN build GitHub workflow to this repository?
Yes, but CI is overall totally missing. I just use ReadTheDocs to get the Documentation build done.
But we have no test cases or other checks currently. And to be honest, I have no idea how to check the layout of a generated PDF automatically. But it would be awesome to have something for it. :)
Regarding your screenshot, it looks like no CSS from Sphinx-SimplePDF got used. Things I see:
Times New Roman / serif
)I will try to test it also manually on a windows machine. But fixes here will need some time.
Thank you for the effort!
Regarding the CI, I have worked at companies where the PDF was converted to a PNG and then a pixel-wise comparison took place. I guess that is too strict for this case.
I can confirm that the docs are built good enough on my WSL Ubuntu. The fonts are no issue there. In some edge cases, I guess I would need to customize the CSS file though.
With weasyprint >= 56 i ran into problems in all code examples, inline code elements. Nothing is rendered on windows in these grey boxes. HTML looks still perfect.
After some playing around i added a new entry into main.css
@font-face { font-family: monospace; font-weight: 400; src: url(fonts/FiraMono-Regular.ttf); }
And code examples and other monospace stuff is displayed in pdf again.
This seems only to affect windows currently, on Ubuntu it works like expected.
fixed in fork of the project, but also updated requirements for the demo project to handle sphinx-needs dependencies (rename from sphinxcontrib-needs).
Cool, thank you @kreuzberger!
Forgotten to mention: As in the first screenshots above BOLD monospace content was printed correctly. Only "regular" Monospace was not printed.
Code-blocks and some other elements are looking strange when build on windows:
Complete DEMO example (WIN build)
On linux it looks like this and the used font is set to![image](https://user-images.githubusercontent.com/998700/190607694-dca3617c-9cb2-4e2f-8c40-8fbc442ad16e.png)
monospace
for the code-block text (set by browser forpre
elements)@1kastner: Can you please check the HTML on your side? Would be interesting, what font is set in the HTML. So a similar browser-image like the one above would be good.