0.0.1 • Published 10 years ago
svg2sfd v0.0.1
svg2sfd
A command line tool for managing font data on a single svg file.
Requirements
- FontForge
- Inkscape
How to install
$ npm install -g svg2sfdHow to use
- Copy the example
- Edit glyphs with Inkscape
- Run
$ svg2sfd /path/to/svg/file.svgand you will get/path/to/svg/file.sfd
Requirements for the structure of the SVG tree
- Each glyph should be a single
<path/> - Each glyph should be a child of the root
<svg>element - Each glyph has a character code in the id attribute. It is specified as a 4-digit base-16 number. For example, a glyph represents "A" has "0041" in the id attribute.
- Use Inkscape grid feature to align glyphs. svg2sfd calculates offsets automatically using grid.
Set the attributes below to the root
<svg>elementsfdSplineFontDB="3.0"sfdEncoding="ISO8859-1"sfdDescent="256"
svg2sfd adds the other "sfd-" prefixed attributes before "BeginChars" line of the .sfd file. For example,
sfdWeight="Medium"results inWeight: Medium.
0.0.1
10 years ago