The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Convert stroke to regular path before merging

These changes was commited to the Birdfont repository Sat, 03 Oct 2015 13:51:26 +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>
Sat, 03 Oct 2015 13:51:26 +0000 (15:51 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 03 Oct 2015 13:52:51 +0000 (15:52 +0200)
commit 514d8c96a8249fd99a638a344e4396fedec23362
tree 5d2d9b3ed9088aa404382e6cae18e401ab1fb3a7
parent 1907b6a3c13fee384cdcac26717df6a50b9621fd
Convert stroke to regular path before merging

libbirdfont/OtfTags.vala
libbirdfont/StrokeTool.vala
--- a/libbirdfont/OtfTags.vala +++ b/libbirdfont/OtfTags.vala @@ -35,16 +35,8 @@ } return tags; - } - - public string to_string () { - StringBuilder sb = new StringBuilder (); - foreach (string s in elements) { - sb.append (s); - } - return sb.str; } } }
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -121,11 +121,18 @@ PathList new_paths = new PathList (); g.store_undo_state (); - + foreach (Path p in g.active_paths) { + if (p.stroke == 0) { + o.add (p); + } else { + o.append (p.get_stroke ()); + } + } + + foreach (Path p in o.paths) { p.close (); p.remove_points_on_points (); - o.add (p); } o = remove_overlap (o);