The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Use unicode character as name in svg fonts

These changes was commited to the Birdfont repository Fri, 26 Sep 2014 15:23:53 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Fri, 26 Sep 2014 15:23:53 +0000]

Updated Files

libbirdfont/SvgFont.vala
resources/linux/birdfont-import.1
--- a/libbirdfont/SvgFont.vala +++ b/libbirdfont/SvgFont.vala @@ -235,6 +235,7 @@ string ligature = ""; SvgParser parser = new SvgParser (); Attribute attr; + StringBuilder unicode_name; parser.set_format (SvgFormat.INKSCAPE); @@ -268,7 +269,10 @@ } } - glyph = new Glyph (glyph_name, unicode_value); + unicode_name = new StringBuilder (); + unicode_name.append_unichar (unicode_value); + + glyph = new Glyph (unicode_name.str, unicode_value); parser.add_path_to_glyph (svg, glyph, true, units); glyph.right_limit = glyph.left_limit + advance * units;
--- a/resources/linux/birdfont-import.1 +++ b/resources/linux/birdfont-import.1 @@ -12,10 +12,10 @@ hexadecimal format. A drawing saved as "a.svg" will be added to the glyph "a" when you run: - birdfont-export typeface.bf a.svg + birdfont-import typeface.bf a.svg A drawing saved as "U+62.svg" will be added to "b" when you run: - birdfont-export typeface.bf U+62.svg + birdfont-import typeface.bf U+62.svg See also birdfont-export for creating SVG, EOT and TTF fonts from the birdfont file.