Are icon fonts like Font Awesome necessary?

If we use inline SVG it’s (XMLish) markup and not image based, so it’ll work with images turned off completely… and also supports the <title> attribute, so if selected by a screen reader it’ll read whatever name we give the icon…

It’ll take a little work to implement, but we can include an SVG spritesheet in the head then call on icons like:

<svg class="icon">
   <use xlink:href="#discourse" />
   <title>Discourse logo</title>
</svg>

On a basic level we can generate a spritesheet of all the fontawesome icons we use today and include that file; down the road it’s probably totally possible to point to a folder of individual svg files and compile them into a spritesheet, so in theory we could have a feature where uploading new SVG icons and generating spritesheets is baked in?

12 лайков