-
Notifications
You must be signed in to change notification settings - Fork 500
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
Icon fonts missing from PDF #97
Comments
Take a look at: #9 |
Indeed. This seems like good Hackergarten material to me :) |
- add support for inline icon macro - allow font set to be changed globally (icon-set=<icon-set> attribute) - allow font set to be changed per icon (set=<icon-set> attribute or append @<icon-set> to target)
resolves #97 add support for inline icon macro
I just got inline icon macros working. What's more, you can use one of 4 icon sets.
Here's a full example:
That reads "the amazon icon in the pf (payment font) icon set". You can also write it as:
You can also set the icon set globally.
In addition to the sizes supported in the HTML backend (lg, 1x, 2x, etc), you can enter any relative value in the size attribute (e.g., 1.5em, 150%, etc).
We don't yet support any way to color the icon. |
I'm on Fedora 22 x86_64 with asciidoctor -v asciidoctor-pdf -v I do not see the Font Awesome icons in the PDF but I do see them in HTML. I've declared :icon-set: fa and use font like this icon:android[size=2x] this works in HTML but in PDF I see text [android] I generate PDF using I also see admonition text and not icons in PDF while in HTML I see icons as expected I'm sure I'm missing something here and any help is appreciated! Thank you for working on such an awesome project! This has made documentation so easy :) |
Can you try?
|
Most of the icon enabling instructions is copied from issue asciidoctor#97. Also moved the important tip about sourcecode highlighting within the coderay section
This worked like a charm for both icons and admonition icons. Thank you! I've sent in a pull request to improve some documentation around this. Could we use multiple icon sets in a single document? |
👍 |
@mojavelinux Does it also work on asciidoctor generating HTML? I can't make it work (I tried with Thanks |
No, this is a feature specific to PDF. There's some discussion about adding it for HTML in this PR: asciidoctor/asciidoctor#1801, but there are technical challenges yet unsolved. |
I'm amazed by your quick answer. I have been in this PR and that's when I tried the icon-set Feather. Looking forward the integration... and by the way, a big 👍 for the great work on Ascidoctor: this really revolutionized my way of doing technical documentation and presentations (+ Reveal.js) since I have discovered it in January 2018. |
Thanks! |
To answer a super old question of @anandchida : yes, you can For example:
|
If
:icons: font
is applied to the document then icons go missing in the final PDF. Asciidoctor outputs the following warninggradle 2.3
asciidoctor 1.5.2
asciidoctorj-pdf 1.5.0-alpha.6
The text was updated successfully, but these errors were encountered: