The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 26 Sep 2014 15:23:53 +0000 (17:23 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 26 Sep 2014 15:24:35 +0000 (17:24 +0200)
commit 520d41083e479e35cbe906e5287ba60c59a9706b
tree 25f0b9a6debc04fcd4a4d020154bc96660140b25
parent 9cf394e2e99db9f934d65d99b1b02a7920075a60
Use unicode character as name in svg fonts

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.