2017 © Pedro Peláez
 

library svg-icon-font-generator

Creates a SVG font from a set of SVG files and vice versa. The glyph mapping is based on the file names – that makes updating and extending easy and fast.

image

madeyourday/svg-icon-font-generator

Creates a SVG font from a set of SVG files and vice versa. The glyph mapping is based on the file names – that makes updating and extending easy and fast.

  • Monday, May 28, 2018
  • by ausi
  • Repository
  • 10 Watchers
  • 85 Stars
  • 133 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

SVG-Icon-Font-Generator

Creates a SVG font from a set of SVG files and vice versa.
The glyph mapping is based on the file names – that makes updating and extending easy and fast., (*1)

Installation

You can create the svg-icon-font-generator.phar by yourself using the following commands: (this requires composer.phar to be installed), (*2)

git clone https://github.com/madeyourday/SVG-Icon-Font-Generator.git
cd SVG-Icon-Font-Generator
php composer.phar install
php build.php

Or download the latest release here: https://github.com/madeyourday/SVG-Icon-Font-Generator/releases, (*3)

System Requirements

  • PHP 5.3 or higher
  • PHP mbstrings needs to be enabled
  • phar.readonly must be off.

Usage

Create a SVG font from a set of SVG files

php svg-icon-font-generator.phar create-font /path/to/svg/files your-font.svg --rename-files

The files should be named like this: * arrow-up-x2191.svg use the correct unicode symbol if possible * magnifying-glass-xe001.svg otherwise use the unicode "Private Use Area" (start from xe001, don't use xe000) * key.svg this file gets automatically mapped to a unicode "Private Use Area" symbol, if you use the --rename-files option this file will be renamed to something like key-xe002.svg, (*4)

The list above generates the class names icon-arrow-up, icon-magnifying-glass and icon-key., (*5)

For creating new icons you can use this SVG template: https://github.com/downloads/madeyourday/SVG-Icon-Font-Generator/icon-template.svg, (*6)

An example set of SVG files can be found here: https://github.com/madeyourday/RockSolid-Icon-Font/tree/master/svg, (*7)

Create a set of SVG files from a SVG font

php svg-icon-font-generator.phar create-files your-font.svg /path/to/svg/files

Create a HTML info page from a SVG font

php svg-icon-font-generator.phar create-info your-font.svg your-font-info.html

Create a CSS file with icon classes from a SVG font

php svg-icon-font-generator.phar create-css your-font.svg your-icons.css

The icon class names are based on the glyph-names specified in the SVG file., (*8)

The Versions

28/05 2018

dev-master

9999999-dev https://github.com/madeyourday/SVG-Icon-Font-Generator

Creates a SVG font from a set of SVG files and vice versa. The glyph mapping is based on the file names – that makes updating and extending easy and fast.

  Sources   Download

MIT

The Requires

 

15/10 2013
05/10 2012
27/09 2012
17/09 2012