-
Notifications
You must be signed in to change notification settings - Fork 68
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
Font-based icons didn't show #155
Comments
So I'm seeing a different problem, which is that with Kindle (using KDP publishing of the .mobi file) it looks like the font-based icons got dropped. They just render as squares, sort of like missing glyphs. I'd like to be able to use images (SVGs) instead, because I think this will lead to a more uniform result across readers (not subject to users or readers choosing different font families) ... but I don't see an easy way to make that work with the -epub variant ... it looks like its kind of font-icons or nothing at all. |
At the moment yes.
Are we assuming Kindle supports SVGs? I can't remember the results of my research.
My understanding is that if you use KDP, the font-based icons are preserved as I documented in the README. However, given Amazon can rewrite the rules at anytime, I can't be 100% sure that my assumption is stable. If you can figure out how to get SVG icons to work for admonitions, I'd be all for it. It's too much work for me to do right now. |
Our real problem with icons is font_icon_map.rb. It is doomed to be outdated. We need a more robust way. |
@slonopotamus you could make a script to generate it. That way CI could take care of it. |
Have you considered including font-awesome css into epub? Possibly, stripped down to only include used icons. And how does asciidoctor-pdf resolve icon name to a glyph? Does it know its Unicode symbol in the process? Maybe that could be reused. |
Asciidoctor PDF also maintains a map (though it's handled by prawn-icon). See https://github.com/jessedoyle/prawn-icon/blob/master/data/fonts/fas/fas.yml That's were I got the idea from. |
Some readers are not showing the icon at all, but highlighting the box in color, while others are just showing brackets instead of the icon. Haven't tested it with Kindle yet. Is this normal? |
@mklueh would you mind creating a new issue? Preferrably, with an example document and info in what reader it doesn't work so others can reproduce (and, hopefully, fix) it? |
Hi, font-based icons work in the generated PDF and HTML files, but not for EPUB files.
For example, in my asciidoc files, there are:
icon:commenting[size=2x]
This "commenting" icon is displayed correctly in the generated PDF and HTML file, but not in the EPUB file.
Looking into the content of EPUB file, I see the following tags in HTML:
So I extract the HTML file and manually changed the empty value of
content
property, as below:Then I repack the EPUB file, and the icon displayed correctly now.
Am I missing something, or is this an known issue/design?
The text was updated successfully, but these errors were encountered: