I am trying to create font from single SVG files. Here the sample:
#!/usr/local/bin/fontforge
# file test.py
import fontforge;
font=fontforge.font();
glyph = font.createChar(65);
glyph.importOutlines("/home/user/guitar.svg");
# or glyph.importOutlines("~/guitar.svg");
# or glyph.importOutlines("./guitar.svg");
# or glyph.importOutlines("guitar.svg");
Any attempts to load single SVG file cause the same error:
Traceback (most recent call last):
File "test.py", line 8, in <module>
glyph.importOutlines("/home/user/guitar.svg");
Where am I wrong?
Environment:
file rights
ls -la /home/user/guitar.svg
-rwxrwxrwx 1 user user 3728 Jun 30 20:46 guitar.svg
OS
$ uname -a
Linux servername 2.6.32-431.11.2.el6.i686 #1 SMP Tue Mar 25 17:17:46 UTC 2014 i686 i686 i386 GNU/Linux
$ cat /etc/centos-release
CentOS release 6.5 (Final)
Python version
$ python --version
Python 2.7.7
Fontforge version
$ fontforge --version
Copyright (c) 2000-2012 by George Williams.
Executable based on sources from 14:57 GMT 31-Jul-2012-TtfDb.
Library based on sources from 14:57 GMT 31-Jul-2012.
fontforge 20120731
libfontforge 11524617
P.S. The same test is OK at Ubuntu 12.04 but the fontforge is other version
$ fontforge --version
Copyright (c) 2000-2011 by George Williams.
Executable based on sources from 13:48 GMT 22-Feb-2011-ML.
Library based on sources from 13:48 GMT 22-Feb-2011.
fontforge 20110222
libfontforge 20110222-ML