The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix distorted TTF shapes in testing code

These changes was commited to the Birdfont repository Thu, 18 Jun 2015 21:19:20 +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, 18 Jun 2015 21:19:20 +0000 (23:19 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Thu, 18 Jun 2015 21:19:20 +0000 (23:19 +0200)
commit 8fd62068a0f0c0e0bd9c14e8b76b69db5beff63d
tree e49f4de7fc69cb86ea2750acb284d28caf8809a3
parent 1ba5925ada8b347d870ce26f32984d37eb47d625
Fix distorted TTF shapes in testing code

libbirdfont/Gradient.vala
libbirdfont/Layer.vala
libbirdfont/OpenFontFormat/GlyfData.vala
libbirdfont/PathList.vala
--- a/libbirdfont/Gradient.vala +++ b/libbirdfont/Gradient.vala @@ -25,6 +25,8 @@ public Gee.ArrayList<Stop> stops; + public int id = -1; + public Gradient () { x1 = 0; y1 = 0;
--- a/libbirdfont/Layer.vala +++ b/libbirdfont/Layer.vala @@ -84,8 +84,14 @@ layer.paths = paths.copy (); foreach (Layer l in subgroups) { layer.subgroups.add (l.copy ()); + } + + if (gradient != null) { + layer.gradient = ((!) gradient).copy (); } + layer.single_path = single_path; + return layer; }
--- a/libbirdfont/OpenFontFormat/GlyfData.vala +++ b/libbirdfont/OpenFontFormat/GlyfData.vala @@ -248,12 +248,14 @@ 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);
--- a/libbirdfont/PathList.vala +++ b/libbirdfont/PathList.vala @@ -21,6 +21,11 @@ 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); }