mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Use embedded SVG instead of fonts for icons, font-awesome 6.2

Open notriddle opened this issue 5 years ago • 6 comments

The downsides of icon fonts are well-documented, and also, why ship all of the icons when it only uses 14?

Note: font-awesome-as-a-crate 0.2.0 requires Rust 1.49.0, because it performs pattern matching on byte slices in a const fn. See https://github.com/rust-lang/docs.rs/pull/1573

notriddle avatar Sep 15 '20 23:09 notriddle

Thanks for the PR! I don't think this is something we can land right away, because I believe there are books that are using the FA icons, and this would break them. I'll try to review it when I get a chance, but merging may need to wait until the next major release.

ehuss avatar Sep 18 '20 14:09 ehuss

That’s fine. mdBook is still 0.4, so it can still release a 0.5 some time.

Also, I should probably document the fa handlebars helper in the manual. Since this is how it’s going to be done now. Should we also add some sort of Markdown pass for icons inline with the book?

notriddle avatar Sep 18 '20 16:09 notriddle

@ehuss Docs and inline fixup for fontawesome icons have been added to the HTML renderer, so that books using font-awesome will still be able to do so.

notriddle avatar Sep 23 '20 21:09 notriddle

@ehuss Now that the fixups are included to allow books that already use font-awesome to continue doing so, and the documentation is written, is there anything else preventing this from being included in the 0.5.0 milestone?

notriddle avatar Dec 23 '21 23:12 notriddle