Commit 8fd6206
Fix distorted TTF shapes in testing code
Changed files (4)
modifiedlibbirdfont/Gradient.valamodifiedlibbirdfont/Layer.valamodifiedlibbirdfont/OpenFontFormat/GlyfData.valamodifiedlibbirdfont/PathList.vala
Diff
@@ -25,6 +25,8 @@ public class Gradient : GLib.Object { public Gee.ArrayList<Stop> stops; + public int id = -1;+ public Gradient () { x1 = 0; y1 = 0;@@ -85,7 +85,13 @@ public class Layer : GLib.Object { foreach (Layer l in subgroups) { layer.subgroups.add (l.copy ()); }++ if (gradient != null) {+ layer.gradient = ((!) gradient).copy ();+ } + layer.single_path = single_path;+ return layer; } @@ -248,12 +248,14 @@ public class GlyfData : GLib.Object { warning (@"Point on point in TTF. Index $(coordinate_y.size - 1)"); // FIXME: distorted shape+ /* if (BirdFont.has_argument ("--test")) { print (glyph.get_name () + "\n"); print (points.get (epi).to_string ()); PenTool.remove_point_simplify (new PointSelection (points.get (epi), p)); return false; }+ */ } prev = rint (e.y * UNITS - font.base_line * UNITS);@@ -21,6 +21,11 @@ public class PathList : GLib.Object { paths = new Gee.ArrayList<Path> (); } + public PathList.for_path (Path p) {+ paths = new Gee.ArrayList<Path> ();+ paths.add (p);+ }+ public void remove (Path p) { paths.remove (p); }