The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 31 Oct 2017 17:22:59 +0000 (18:22 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 31 Oct 2017 17:22:59 +0000 (18:22 +0100)
commit a6a6f407e42ee8ff8256a0a08d42e7f468b0b22a
tree 37f890de8a28c29796e15e8550c5bb796d730286
parent bb8e914e3ff91775df019f6ee4977f1c056e5c60
Xml encoding

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 ();