The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – 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
[Sat, 03 Oct 2015 13:51:26 +0000]

Updated Files

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);