Clone in a terminal:
Commit a25a9c8
Johan Mattsson - 2013-02-09T21:01:48+00:00
a25a9c8e9114ae2ee966e6eb5a4f7feb970c8934johan.mattsson.m@gmail.com

ignore invalid kerning in export

Changed files (4)

Diff

diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex 3c16e43..255b664 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -571,8 +571,13 @@ public class Font : GLib.Object { 			} 			 			glyph_cache.for_each ((gc) => {+				bool selected;+				+				if (is_null (gc)) {+					warning ("No glyph collection");+				}+				 				try {-					bool selected; 					foreach (Glyph g in gc.get_version_list ().glyphs) { 						selected = (g == gc.get_current ()); 						write_glyph (g, selected, os);@@ -584,16 +589,19 @@ public class Font : GLib.Object { 			}); 		 			glyph_cache.for_each ((gc) => {+				Glyph glyph;+				 				try {-					Glyph glyph = gc.get_current ();+					glyph = gc.get_current (); 					 					foreach (Kerning k in glyph.kerning) { 						string l, r; 						Glyph? gr = get_glyph (k.glyph_right); 						Glyph glyph_right;-						+ 						if (gr == null) {-							warning ("kerning glyph that does not exist.");+							warning ("kerning a glyph that does not exist. (" + glyph.name + " -> " + k.glyph_right + ")");+							continue; 						} 						 						glyph_right = (!) gr;diff --git a/libbirdfont/GlyphTable.vala b/libbirdfont/GlyphTable.valaindex 5495c1f..24d8bb4 100644--- a/libbirdfont/GlyphTable.vala+++ b/libbirdfont/GlyphTable.vala@@ -35,7 +35,17 @@ class GlyphTable : GLib.Object { 	}  	public void @for_each (Func<GlyphCollection> func) {+		if (unlikely (is_null (data))) {+			warning ("No data in table");+			return;+		}+		 		data.foreach ((v) => {+			if (unlikely (is_null (v))) {+				warning ("No value found in GlyphTable.");+				return;+			}+						 			func (v.glyph_collection); 		}); 	}diff --git a/libbirdfont/Path.vala b/libbirdfont/Path.valaindex e7e4863..ca89b28 100644--- a/libbirdfont/Path.vala+++ b/libbirdfont/Path.vala@@ -970,7 +970,7 @@ public class Path { 		eh.length = 0;  		eh = ((!)quadratic_path.points.last ().prev).data.get_right_handle ();-		eh.set_point_type (PointType.QUADRATIC);+		eh.set_point_type (PointType.CURVE); 		eh.length *= 1.6;  		return quadratic_path;@@ -990,7 +990,7 @@ public class Path { 		eh.length = 0; 		 		eh = start.get_right_handle ();-		eh.set_point_type (PointType.QUADRATIC);+		eh.set_point_type (PointType.CURVE); 		eh.move_to_coordinate (curve_x, curve_y); 	} diff --git a/libbirdfont/SvgFontFormatWriter.vala b/libbirdfont/SvgFontFormatWriter.valaindex 25f1443..75d9292 100644--- a/libbirdfont/SvgFontFormatWriter.vala+++ b/libbirdfont/SvgFontFormatWriter.vala@@ -105,6 +105,7 @@ class SvgFontFormatWriter : Object  { 				 				if (gr == null) { 					warning ("kerning glyph that does not exist.");+					continue; 				} 				 				glyph_right = (!) gr;

Contact

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