Commit 321166c
Merge ../birdfont-2.x
Changed files (4)
modifiedlibbirdfont/Font.valamodifiedlibbirdfont/OpenFontFormat/GlyfTable.valamodifiedlibbirdfont/SvgParser.valamodifiedscripts/version.py
Diff
@@ -438,9 +438,16 @@ public class Font : GLib.Object { public GlyphCollection get_nonmarking_return () { Glyph g; GlyphCollection gc;+ GlyphCollection? non_marking; if (has_glyph ("nonmarkingreturn")) {- return (!) get_glyph_collection ("nonmarkingreturn");+ non_marking = get_glyph_collection ("nonmarkingreturn");+ + if (non_marking == null) {+ warning ("Non marking return not created.");+ } else {+ return (!)non_marking;+ } } gc = new GlyphCollection ('\r', "nonmarkingreturn");@@ -462,9 +469,16 @@ public class Font : GLib.Object { public GlyphCollection get_null_character () { Glyph n; GlyphCollection gc;+ GlyphCollection? none; if (has_glyph ("null")) {- return (!) get_glyph_collection ("null");+ none = get_glyph_collection ("null");+ + if (none == null) {+ warning("Null character not created.");+ } else {+ return (!) none;+ } } gc = new GlyphCollection ('\0', "null");@@ -485,14 +499,19 @@ public class Font : GLib.Object { public GlyphCollection get_space () { Glyph n;- GlyphCollection gc;+ GlyphCollection gc; + GlyphCollection? space = null; if (has_glyph (" ")) {- return (!) get_glyph_collection (" ");+ space = get_glyph_collection (" "); } if (has_glyph ("space")) {- return (!) get_glyph_collection ("space");+ space = get_glyph_collection ("space");+ }++ if (space != null) {+ return (!) space; } gc = new GlyphCollection (' ', "space");@@ -113,15 +113,17 @@ public class GlyfTable : OtfTable { foreach (GlyphCollection gc in glyphs) { g = gc.get_current ();++ printd (@"adding glyph: $(gc.get_name ())\n");+ // set values for loca table assert (fd.length () % 4 == 0); location_offsets.add (fd.length ()); process_glyph (g, fd); - printd (@"adding glyph: $(g.name)\n"); printd (@"glyf length: $(fd.length () - last_len)\n"); printd (@"loca fd.length (): $(fd.length ())\n");-+ last_len = fd.length (); } @@ -194,6 +196,13 @@ public class GlyfTable : OtfTable { foreach (GlyphCollection ug in unassigned_glyphs) { glyphs.add (ug); }+ + + int gid = 0;+ foreach (GlyphCollection ug in glyphs) {+ printd (@"Glyph: $(ug.get_name ()) GID: $(gid)\n");+ gid++;+ } } public void process_glyph (Glyph g, FontData fd) throws GLib.Error {@@ -1491,7 +1491,10 @@ public class SvgParser { return 0; } - return double.parse ((!) s);+ string d = (!) s;+ d = d.replace ("px", "");+ + return double.parse (d); } static bool is_point (string? s) {@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. """ -VERSION = '2.15.6'+VERSION = '2.16.0' SO_VERSION_MAJOR = '36' SO_VERSION_MINOR = '0' SO_VERSION = SO_VERSION_MAJOR + '.' + SO_VERSION_MINOR