The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix SVG import from inkscape

These changes was commited to the Birdfont repository Fri, 13 Mar 2015 11:16:51 +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, 13 Mar 2015 11:16:51 +0000 (12:16 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 13 Mar 2015 11:17:40 +0000 (12:17 +0100)
commit e59af334bfcd7af2e4adcda702db8832afa55f26
tree 3b7ac3b3ef6e9aff26bccd0ea7911e039644cc72
parent 6ebad6be3cf271e16882c628b200182fb70f72f9
Fix SVG import from inkscape
Make sure the last handle gets a value if there are several paths in
one object.

libbirdfont/SvgParser.vala
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -67,6 +67,7 @@ if (l.index_of ("Inkscape") > -1 || l.index_of ("inkscape") > -1) { parser.set_format (SvgFormat.INKSCAPE); has_format = true; + print("Inkscape SVG import.\n"); } } @@ -1190,7 +1191,7 @@ ep.get_left_handle ().set_point_type (PointType.LINE_CUBIC); - if (i == 0) { + if (i == 0 || (b[i - 1].type == 'z')) { ep.get_left_handle ().set_point_type (last_type); ep.get_left_handle ().move_to_coordinate (last_x, last_y); } else {