The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix points on points removal in SVG import

These changes was commited to the Birdfont repository Thu, 21 Jan 2016 20:44:07 +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>
Thu, 21 Jan 2016 20:44:07 +0000 (21:44 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Thu, 21 Jan 2016 20:44:07 +0000 (21:44 +0100)
commit 7b155cd4bea52abf8666c3c34c3f5ff964ec6a3f
tree da196319d9a875a1ece068d17244feb91d133922
parent 2b7c94f47389b1b177204a4d5ffc8ff19548c809
Fix points on points removal in SVG import

libbirdfont/Path.vala
libbirdfont/SvgParser.vala
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 2013 2014 2015 Johan Mattsson + Copyright (C) 2012 - 2016 Johan Mattsson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -2313,10 +2313,11 @@ if (points.size == 0) { return; } - + for (int i = 0; i < points.size + 1; i++) { EditPoint ep = points.get (i % points.size); - if (ep.get_right_handle ().length < t3 + if ((ep.flags & EditPoint.STROKE_OFFSET) > 0 + && ep.get_right_handle ().length < t3 && ep.get_left_handle ().length < t3 && !is_endpoint (ep) && (ep.flags & EditPoint.CURVE_KEEP) == 0
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 2013 2014 2015 Johan Mattsson + Copyright (C) 2012 - 2016 Johan Mattsson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as