Clone in a terminal:
Commit 321166c
Johan Mattsson - 2016-06-04T14:50:11+00:00
321166c20d7f747f36cd905e9ca52dc0b2af6b8ajohan.mattsson.m@gmail.com

Merge ../birdfont-2.x

Changed files (4)

Diff

diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex 58466c4..78e7526 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -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");diff --git a/libbirdfont/OpenFontFormat/GlyfTable.vala b/libbirdfont/OpenFontFormat/GlyfTable.valaindex ba41826..533f7fa 100644--- a/libbirdfont/OpenFontFormat/GlyfTable.vala+++ b/libbirdfont/OpenFontFormat/GlyfTable.vala@@ -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 {diff --git a/libbirdfont/SvgParser.vala b/libbirdfont/SvgParser.valaindex 6996bf6..58f2486 100644--- a/libbirdfont/SvgParser.vala+++ b/libbirdfont/SvgParser.vala@@ -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) {diff --git a/scripts/version.py b/scripts/version.pyindex bdbc650..1ea7b58 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -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

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112