Clone in a terminal:
Commit c17684a
Johan Mattsson - 2015-05-31T20:04:10+00:00
c17684ad031dad0e8f58a300cbf39c6a18f667e5johan.mattsson.m@gmail.com

Better parsing of TrueType outlines Fixes parsing of "c with hook" in DejaVu Sans Extra Light

Changed files (3)

Diff

diff --git a/libbirdfont/BirdFontFile.vala b/libbirdfont/BirdFontFile.valaindex 228c1d7..05cc796 100644--- a/libbirdfont/BirdFontFile.vala+++ b/libbirdfont/BirdFontFile.vala@@ -738,6 +738,7 @@ class BirdFontFile : GLib.Object { 			if (t.get_name () == "weight") { 				font.weight = int.parse (t.get_content ()); 			}+			 			if (t.get_name () == "images") { 				parse_images (t); 			}@@ -1391,7 +1392,7 @@ class BirdFontFile : GLib.Object { 	} 	 	public static void close (Path path) {-		EditPoint ep1, ep2;+		EditPoint ep1, ep2, last; 		 		if (path.points.size < 2) { 			warning ("Less  than two points in path.");@@ -1404,10 +1405,12 @@ class BirdFontFile : GLib.Object { 		 		path.points.remove_at (path.points.size - 1); 		-		ep2.tie_handles = ep1.tie_handles;-		ep2.left_handle.angle = ep1.left_handle.angle;-		ep2.left_handle.length = ep1.left_handle.length;-		ep2.left_handle.type = ep1.left_handle.type;+		if (ep1.type != PointType.QUADRATIC || ep2.type != PointType.QUADRATIC) {+			ep2.tie_handles = ep1.tie_handles;+			ep2.left_handle.angle = ep1.left_handle.angle;+			ep2.left_handle.length = ep1.left_handle.length;+			ep2.left_handle.type = ep1.left_handle.type;+		} 		 		path.close (); 	}diff --git a/libbirdfont/OverViewItem.vala b/libbirdfont/OverViewItem.valaindex f359c47..bedb6d9 100644--- a/libbirdfont/OverViewItem.vala+++ b/libbirdfont/OverViewItem.vala@@ -48,8 +48,7 @@ public class OverViewItem : GLib.Object { 		this.y = y; 		this.character = character; 		this.glyphs = glyphs;-		this.info = new CharacterInfo (character, glyphs);-		info.set_position (x + width - 17, y + height - 22.5);+		this.info = new CharacterInfo (character, glyphs);		  		label = new Text ((!) character.to_string (), 17);		 		truncate_label ();@@ -110,10 +109,9 @@ public class OverViewItem : GLib.Object { 		bool a; 		GlyphCollection g; 		bool s = (x <= px <= x + width) && (y <= py <= y + height);-	+ 		if (has_icons () && glyphs != null) { 			g = (!) glyphs;-			 			version_menu.set_position (x + width - 21, y + height - 18); 			a = version_menu.menu_item_action (px, py); // select one item on the menu 			if (a) {@@ -123,6 +121,7 @@ public class OverViewItem : GLib.Object { 			version_menu.menu_icon_action (px, py); // click in the open menu 		} 		+		info.set_position (x + width - 17, y + height - 22.5); 		if (has_icons () && info.is_over_icon (px, py)) { 			MainWindow.get_overview ().set_character_info (info); 		}diff --git a/libbirdfont/Renderer/FallbackFont.vala b/libbirdfont/Renderer/FallbackFont.valaindex e9d289e..ec2bd08 100644--- a/libbirdfont/Renderer/FallbackFont.vala+++ b/libbirdfont/Renderer/FallbackFont.vala@@ -151,9 +151,6 @@ public class FallbackFont : GLib.Object { 		if (glyph_data == null) { 			font_file = find_font (font_config, (!) c.to_string ()); 			if (font_file != null) {-				printd ((!) font_file); // FIXME: DELETE-				printd ("\n");- 				font = open_font ((!) font_file); 				glyph_data = get_glyph_in_font (font, c); 				close_font (font);

Contact

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