Commit 139c6c1
export baseline as sodipodi guide
Changed files (2)
Diff
@@ -45,6 +45,7 @@ public class ExportTool : Tool { string glyph_svg; string name; StringBuilder s;+ double baseline; name = glyph.get_name (); s = new StringBuilder ();@@ -53,12 +54,18 @@ public class ExportTool : Tool { <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > <svg """); - s.append (@"xmlns=\"http://www.w3.org/2000/svg\"\n");+ s.append ("xmlns=\"http://www.w3.org/2000/svg\"\n");+ s.append ("\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n"); s.append (@"\twidth=\"$(glyph.get_width () / Glyph.SCALE)\"\n"); s.append (@"\theight=\"$(glyph.get_height () / Glyph.SCALE)\"\n"); s.append (@"\tid=\"glyph_$(name)\"\n"); s.append (@"\tversion=\"1.1\">\n");+ s.append (@"\n"); + baseline = glyph.get_height () - font.get_height (); // guides uses a different coordinate system+ s.append ("<sodipodi:namedview>\n");+ s.append (@"\t<sodipodi:guide orientation=\"0,1\" position=\"0,$baseline\" id=\"baseline\" />\n");+ s.append ("</sodipodi:namedview>\n"); s.append (@"\n"); s.append (@"<g id=\"$(name)\">\n");@@ -938,17 +938,6 @@ class GlyfTable : Table { linked_glyph = parse_next_glyf (dis, character, glid, out xmin, out xmax, units_per_em); } - - - /* - if ((component_flags & INSTRUCTIONS) > 0) { - num_instructions = dis.read_ushort (); - - for (int i = 0; i < num_instructions; i++) { - dis.read_byte (); - } - } - */ return glyph; }