The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – 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
[Tue, 05 Jul 2016 13:01:59 +0000]

Updated Files

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") {