The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix SVG format setting

These changes was commited to the Birdfont repository Wed, 06 Jul 2016 22:02:40 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Wed, 06 Jul 2016 22:02:40 +0000]

Updated Files

libbirdfont/SvgParser.vala
libsvgbird/SvgFile.vala
--- a/libbirdfont/SvgParser.vala +++ b/libbirdfont/SvgParser.vala @@ -157,10 +157,6 @@ parser.set_format (SvgFormat.INKSCAPE); has_format = true; } - } - - if (format != SvgFormat.NONE) { - parser.set_format (format); } // parse the file @@ -1138,13 +1134,13 @@ } move_and_resize (bezier_points, points, svg_glyph, units, glyph); - path_list = create_svg_paths (d, format); + path_list = create_svg_paths (d); // TODO: Find out if it is possible to tie handles. return path_list; } - public PathList create_svg_paths (string path_data, SvgFormat format) { + public PathList create_svg_paths (string path_data) { Gee.ArrayList<Points> points_set = SvgFile.parse_points (path_data, format); PathList path_list = new PathList ();
--- a/libsvgbird/SvgFile.vala +++ b/libsvgbird/SvgFile.vala @@ -870,8 +870,6 @@ } if (format == SvgFormat.ILLUSTRATOR) { - print ("Remove first"); - Gee.ArrayList<Points> illustrator_path_data = new Gee.ArrayList<Points> (); foreach (Points p in path_data) { @@ -914,8 +912,9 @@ return double.parse ((!) s); } - // FIXME: rename to instructions - public static void get_bezier_points (string point_data, out BezierPoints[] bezier_points, out int points, bool svg_glyph) { + public static void get_bezier_points (string point_data, + out BezierPoints[] bezier_points, out int points, bool svg_glyph) { + double px = 0; double py = 0; double px2 = 0;