Clone in a terminal:
Commit 0e2c0de
Johan Mattsson - 2015-04-27T19:42:45+00:00
0e2c0def307d2b153b9e402b726558e3bd899482johan.mattsson.m@gmail.com

Remove parts without are in stroke

Changed files (2)

Diff

diff --git a/libbirdfont/ForesightTool.vala b/libbirdfont/ForesightTool.valaindex 313d3a7..4475793 100644--- a/libbirdfont/ForesightTool.vala+++ b/libbirdfont/ForesightTool.vala@@ -47,6 +47,7 @@ public class ForesightTool : Tool { 				p.release_action (p, 1, last_move_x, last_move_y); 			} 			+			MainWindow.set_cursor (NativeWindow.VISIBLE); 			state = NONE; 		}); @@ -57,6 +58,7 @@ public class ForesightTool : Tool { 				p.release_action (p, 1, last_move_x, last_move_y); 			} 			+			MainWindow.set_cursor (NativeWindow.VISIBLE); 			state = NONE; 		}); 		@@ -211,6 +213,7 @@ public class ForesightTool : Tool { 			if (state == MOVE_HANDLES || state == MOVE_LAST_HANDLE) {				 				if (previous_point > 0) { 					return_if_fail (PenTool.active_path.points.size >= previous_point + 1);+					return_if_fail (PenTool.active_path.points.size > 0); 					last = new PointSelection (PenTool.active_path.points.get (PenTool.active_path.points.size - (previous_point + 1)), PenTool.active_path);				 				} else { 					if (unlikely (PenTool.selected_points.size == 0)) {diff --git a/libbirdfont/StrokeTool.vala b/libbirdfont/StrokeTool.valaindex 59b8854..5c619e3 100644--- a/libbirdfont/StrokeTool.vala+++ b/libbirdfont/StrokeTool.vala@@ -1032,7 +1032,13 @@ public class StrokeTool : Tool { 		foreach (EditPoint ep in p.points) { 			l = ep.get_left_handle (); 			r = ep.get_right_handle ();-			if (!(fabs (l.angle - r.angle) < 0.0001 && l.length > 0.01 && r.length > 0.01)) {+			+			if (l.length < 0.01 || r.length < 0.01) {+				continue;+			}+			+			if (!(fabs ((l.angle - r.angle + PI) % 2 * PI) < 0.0001)+				&& !(fabs (l.angle - r.angle) < 0.0001)) { 				return false; 			} 		}@@ -1710,7 +1716,7 @@ public class StrokeTool : Tool { 			p2 = path.points.get ((i + 1) % path.points.size); 			p3 = path.points.get ((i + 2) % path.points.size); 			-			tolerance = 1.2 / sqrt (stroke_width);+			tolerance = 0.13 / sqrt (stroke_width); 			step_increment = 1.1; 			step_size = 0.039 / stroke_width; 

Contact

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