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
SVG admonition icons don't work #828
Comments
This is most probably a problem of prawn-svg gem (https://github.com/mogest/prawn-svg) that doesn't provide class Prawn::Image::SVG. See also https://github.com/prawnpdf/prawn/blob/master/lib/prawn/image_handler.rb and for example https://github.com/prawnpdf/prawn/blob/master/lib/prawn/images/jpg.rb |
Another way to put it is that we have to add dedicated support for SVG whereever an image is allowed. It's more than just the fact that the Prawn SVG doesn't hook into the image helper in Prawn. It's that we always have to do special processing for SVGs because they simple require it. This was just not one of the places for using SVG that we had considered. |
I was bitten by this issue as well. |
A PR is now available for this request. Please see #953. |
This checks the 'icontype' and uses prawn-svg to render svg icons. Signed-off-by: Keith Packard <keithp@keithp.com>
Using:
Asciidoctor PDF 1.5.0.alpha.15 using Asciidoctor 1.5.5 [http://asciidoctor.org]
Runtime Environment (ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:- ex:IBM437)
With:
:icontype: svg
I get:
asciidoctor: WARNING: could not embed admonition icon image: images/icons/warning.svg; image file is an unrecognised format
SVGs work fine as images, can they be allowed for icons as well?
The text was updated successfully, but these errors were encountered: