News for hackers. Stuff that matters.
Re:Magical SVG Techniques by remram on Friday May 27, 2022 @01:13PM (#31532060)
I've been using defs to replace the font-awesome fonts and saving megabytes (to show the same icons).
Re:Magical SVG Techniques by rambambram on Friday May 27, 2022 @04:36PM (#31534566)
Sounds interesting. Can you tell some more about it? Do I understand correctly that you are replacing icons with SVG's? Or even the font of regular text?
Re:Magical SVG Techniques by iostream24 on Friday May 27, 2022 @06:00PM (#31535425)
Not the OP, but you can save the paths as objects in your preferred programming language and then inject them into svg tags inline.
Re:Magical SVG Techniques by remram on Saturday May 28, 2022 @10:47AM (#31540747)
Instead of including FA's stylesheets and fonts, you just have an SVG with some defs.

Instead of having a <i class=...></i> to use an icon, which CSS turns into a specific character with a specific font name, which the font turns into a specific glyph from that font (usually SVG), you have a <svg><use ...></svg>

You can use the same icon because FA is already using SVG fonts, you can copy and paste the icons out.