14

I'm searching for a script to convert multiple SVG images (each containing one letter) to a SVG font file.

Basically the same this website does: http://keyamoon.com/icomoon/app/

But I would prefer a script (preferable Linux), so we can integrate it in our build process.

Any ideas? Or code I can start with?

Input should be a list of SVG images + a mapping file and the output should be one file containing all the SVG images as SVG font.

JochenJung
  • 7,183
  • 12
  • 64
  • 113

3 Answers3

13

FYI, two guys just released a project to do this very thing:

https://github.com/FontCustom/fontcustom

jilen
  • 5,633
  • 3
  • 35
  • 84
commadelimited
  • 5,656
  • 6
  • 41
  • 77
4

I wrote a command line application that creates a SVG font from a set of SVG files and vice versa: https://github.com/madeyourday/SVG-Icon-Font-Generator

It's written in PHP and is currently in beta.

But it's using no mapping file, the mapping is based on the file names.

ausi
  • 7,253
  • 2
  • 31
  • 48
1

The Apache Batik project has a SVG Font converter which may be an option for you.

From their font converter example:

java -jar batik-ttf2svg.jar /usr/home/myFont.ttf -l 48 -h 57 -id MySVGFont -o mySVGFont.svg -testcard
pd40
  • 3,187
  • 3
  • 20
  • 29
  • Batiks SVG Font converter converts a TrueType Font to an SVG Font. This could be an option, if I had a script, that would convert my SVG images, to a TrueType Font. Do you know of any? – JochenJung Jul 03 '12 at 12:05
  • I think you would have to write your own. The command line options are documented here -> http://xmlgraphics.apache.org/batik/tools/font-converter.html. I'll update my answer with this link – pd40 Jul 03 '12 at 13:26