The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Xml encoding

These changes was commited to the Birdfont repository Tue, 31 Oct 2017 17:22:59 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 31 Oct 2017 17:22:59 +0000]

Updated Files

libbirdfont/ExportTool.vala
libbirdfont/FontSettings.vala
libbirdfont/SvgFontFormatWriter.vala
--- a/libbirdfont/ExportTool.vala +++ b/libbirdfont/ExportTool.vala @@ -61,7 +61,7 @@ string name; StringBuilder s; - name = XmlParser.encode (glyph.get_name ()); + name = BirdFontFile.encode (glyph.get_name ()); s = new StringBuilder (); s.append ("""<?xml version="1.0" encoding="utf-8"?>
--- a/libbirdfont/FontSettings.vala +++ b/libbirdfont/FontSettings.vala @@ -65,10 +65,10 @@ foreach (var k in settings.keys) { sb.append ("\t<setting key=\""); - sb.append (XmlParser.encode (k)); + sb.append (BirdFontFile.encode (k)); sb.append ("\" "); sb.append ("value=\""); - sb.append (XmlParser.encode (settings.get (k))); + sb.append (BirdFontFile.encode (settings.get (k))); sb.append ("\" />\n"); } @@ -114,11 +114,11 @@ string v = ""; foreach (Attribute a in tag.get_attributes ()) { if (a.get_name () == "key") { - key = XmlParser.decode (a.get_content ()); + key = BirdFontFile.decode (a.get_content ()); } if (a.get_name () == "value") { - v = XmlParser.decode (a.get_content ()); + v = BirdFontFile.decode (a.get_content ()); } }
--- a/libbirdfont/SvgFontFormatWriter.vala +++ b/libbirdfont/SvgFontFormatWriter.vala @@ -58,7 +58,7 @@ // (metadata goes here) string font_id = font_name.replace (" ", "-"); - font_id = B.XmlParser.encode (font_id); + font_id = BirdFontFile.encode (font_id); Glyph space = font.get_space ().get_current (); double space_width = space.get_width ();