Skip to content
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

Converting riscv-isa-manuals asciidoc results in text-less wavedrom diagrams because of 3rd party bug #1019

Closed
damageboy opened this issue Apr 22, 2023 · 5 comments · Fixed by #1025 or riscv/riscv-control-transfer-records#10

Comments

@damageboy
Copy link
Contributor

I realize the the asciidoc versions of the isa-manual is not complete, and I'm mostly reaching out through this issue to @wmat in hopes there is some secret knowledge about wavedrom-cli that could be shared.

In short, I'm trying to generate the asciidoc html/pdf versions locally after replicating the build environment but I'm getting an annoying artifact in both the pdf and the html versions where the wavedrom diagrams are generated without any text rendered inside them:

image

Trying to render this directly through wavedrom-cli replicated the bug when rendering to PNG only and not with SVG,
and seems to be a known issue reported in the wavedrom repo and unfixed in node-svg2img.

Is there a change that a PR for switching to generating SVGs instead of PNGs would be accepted for the asciidoc version given this (unresolved) bug and SVGs generally being slightly more friendty (IMO) for zooming in / printing / hidpi in general?

@damageboy
Copy link
Contributor Author

Just in case it wasn't entirely clear I'm effectively suggesting to submit a PR of all the modified wavedrom files after running:

sed -i 's/^\[wavedrom, ,\]/[wavedrom, ,svg]/' src/images/wavedrom/*.adoc

Unfortunately I did not find an easy way to perform this change globally through a theme file or otherwise, although my asciidoctor is still very shallow.

@wmat
Copy link
Collaborator

wmat commented Apr 24, 2023 via email

@damageboy
Copy link
Contributor Author

I'll submit the change to use svg in that case, while not everything is converted bytefield-svg

@wmat
Copy link
Collaborator

wmat commented Apr 27, 2023

It just occurred to me that you may be missing some fonts. WavedRom diagrams require the Helvetica font, I believe. Also, I build locally and it works for me.

@wmat
Copy link
Collaborator

wmat commented May 15, 2023

Note that this change renders all wavedroms without any color, effectively ignoring the "type" attribute. I'm currently looking for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants