The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Export stroked paths

These changes was commited to the Birdfont repository Sun, 19 Apr 2015 17:55:17 +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>
Sun, 19 Apr 2015 17:55:17 +0000 (19:55 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 19 Apr 2015 17:55:17 +0000 (19:55 +0200)
commit 535caefb05f90fb28eb0f599d2a0214b8196e4fd
tree 92b935b11002dce2fe3481cb7f6ef35bcfd6f654
parent 0ae35da3e6cf282400178b258eb40b840a2ff285
Export stroked paths

libbirdfont/Glyph.vala
libbirdfont/Path.vala
--- a/libbirdfont/Glyph.vala +++ b/libbirdfont/Glyph.vala @@ -140,11 +140,20 @@ public PathList get_quadratic_paths () { PointConverter pc; PathList pl; + PathList stroke; pl = new PathList (); foreach (Path p in path_list) { - pc = new PointConverter (p); - pl.add (pc.get_quadratic_path ()); + if (p.stroke > 0) { + stroke = StrokeTool.get_stroke (p, p.stroke); + foreach (Path stroke_part in stroke.paths) { + pc = new PointConverter (stroke_part); + pl.add (pc.get_quadratic_path ()); + } + } else { + pc = new PointConverter (p); + pl.add (pc.get_quadratic_path ()); + } } return pl;
--- a/libbirdfont/Path.vala +++ b/libbirdfont/Path.vala @@ -1196,7 +1196,8 @@ * for ttf-export. */ public Path get_quadratic_points () { - PointConverter converter = new PointConverter (this); + PointConverter converter; + converter = new PointConverter (this); return converter.get_quadratic_path (); }