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

FontAwesome icons not rendered correctly #65

Closed
odrotbohm opened this issue Sep 13, 2022 · 6 comments
Closed

FontAwesome icons not rendered correctly #65

odrotbohm opened this issue Sep 13, 2022 · 6 comments
Milestone

Comments

@odrotbohm
Copy link
Contributor

In contrast to the standard HTML backend, our generated documents are missing the directive to include the FontAwesome icon CSS file

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

There's code that sets the icons to be font-based by default, but also deactivates remote fonts (a line below). If we really want the latter, we'd have to ship FontAwesome CSS and fonts ourselves.

@philwebb
Copy link
Contributor

Setting icons to font might be an oversight in our CSS. I can't remember why we did it, it might have been to get HTML markup that was easier to style even though we don't directly use font-awsome. For the limited "icons" that we do use, we have a single octicons-16.svg file.

Are you wanting to use font-awesome directly in markup? Or are you finding one of the existing admon icons isn't correct?

@odrotbohm
Copy link
Contributor Author

Yes, the sources I deal with contain icon:folder[] expressions that render fine when using the standard HTML backend.

@philwebb
Copy link
Contributor

philwebb commented Sep 22, 2022

I remember a bit more about why the font support is so odd. The CSS for this backend is based on Antora and they don't currently have support for font-awesome. We use the :icons: font attribute to generate CSS we can use, but actually implement fa CSS class by loading images from an SVG file.

I've got something hacked locally that reinstates font-awsome 4 support but I need to do some more testing before it can be merged.

@odrotbohm
Copy link
Contributor Author

Thanks for the update, Phil! Happy to give some snapshots a spin if that helps.

@philwebb philwebb modified the milestones: 0.0.3, 0.0.4 Sep 27, 2022
@philwebb
Copy link
Contributor

@odrotbohm I've pushed something, but you'll need to set a :iconfont-fontawesome: attribute to enable the feature. Let me know if it doesn't work.

@odrotbohm
Copy link
Contributor Author

I can confirm this works as described! Thanks, Phil! 🙇

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

No branches or pull requests

3 participants