The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix position in SVG to TTF conversion

These changes was commited to the Birdfont repository Tue, 05 Jul 2016 13:01:59 +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>
Tue, 05 Jul 2016 13:01:59 +0000 (15:01 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 05 Jul 2016 13:01:59 +0000 (15:01 +0200)
commit a020eb0bb50a7a90974083fb1c5f46611c93aaa4
tree 15a06f5fea2cadde7d268dd1e6afa181a2eea875
parent bd0535cdef587a67a2adc905f5193f4850b52a64
Fix position in SVG to TTF conversion

libbirdfont/MoveTool.vala
libbirdfont/SvgParser.vala
--- a/libbirdfont/MoveTool.vala +++ b/libbirdfont/MoveTool.vala @@ -555,7 +555,7 @@ glyph.delete_object (svg); foreach (Path path in path_list.paths) { - path.move (svg.x - glyph.left_limit, svg.y - font.top_position); + path.move (svg.x - glyph.left_limit, svg.y - font.top_limit); } } }
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -216,8 +216,11 @@ } private PathList parse_svg_file (XmlElement tag) { - Layer pl = new Layer (); + Layer layer = new Layer (); + return parse_svg_tag (tag, layer); + } + private PathList parse_svg_tag (XmlElement tag, Layer pl) { foreach (XmlElement t in tag) { if (t.get_name () == "g") { @@ -225,7 +228,7 @@ } if (t.get_name () == "svg") { - parse_layer (t, pl); + parse_svg_tag (t, pl); } if (t.get_name () == "switch") {