Read more

Rails Asset Pipeline: Building an Icon Font from SVG Files

Dominik Schöler
May 27, 2019Software engineer at makandra GmbH

Please use this approach instead.

Webpacker can automatically create an icon font from SVG files, which is really handy. When you're using the asset pipeline, you can still have an icon font from SVG files, but it requires some manual work.

Creating the icon font

  • Install the NPM package icon-font-generator. If you're not using nvm, run sudo npm install -g icon-font-generator
  • Put all SVG icons for the font into their own directory.
    • The icon name will be taken from the SVG file name
  • Download the attached script and update the Configure section
  • Run it
  • Turn the CSS and JSON output into usable styles for your application

Tools

See also

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot
Posted by Dominik Schöler to makandra dev (2019-05-27 10:17)