Clone in a terminal:
Commit 8e4ec75
Johan Mattsson - 2015-05-03T19:05:52+00:00
8e4ec75499fc37c9345dd200be4115fb43e641adjohan.mattsson.m@gmail.com

Copy and paste strokes

Changed files (2)

Diff

diff --git a/libbirdfont/ClipTool.vala b/libbirdfont/ClipTool.valaindex 1d8c9e6..1cd6c6f 100644--- a/libbirdfont/ClipTool.vala+++ b/libbirdfont/ClipTool.vala@@ -237,12 +237,20 @@ public class ClipTool : Tool { 					s.append ("BF path: "); 					s.append (BirdFontFile.get_point_data (path)); 					s.append ("\n");+					+					s.append ("BF stroke: ");+					s.append (@"$(path.stroke)");+					s.append ("\n"); 				} 			} else if (glyph.path_list.size > 0) { 				foreach (Path path in glyph.active_paths) { 					s.append ("BF path: "); 					s.append (BirdFontFile.get_point_data (path)); 					s.append ("\n");+					+					s.append ("BF stroke: ");+					s.append (@"$(path.stroke)");+					s.append ("\n"); 				} 			} else { 				new_path = new Path ();@@ -282,6 +290,10 @@ public class ClipTool : Tool { 						s.append ("BF path: "); 						s.append (BirdFontFile.get_point_data (path)); 						s.append ("\n");+						+						s.append ("BF stroke: ");+						s.append (@"$(path.stroke)");+						s.append ("\n"); 					} 				} 			}@@ -309,6 +321,7 @@ public class ClipTool : Tool { 		Glyph destination; 		GlyphCollection glyph_collection = new GlyphCollection ('\0', ""); 		OverView o;+		Path path = new Path (); 		 		foreach (string p in items) { 			if (p.has_prefix ("glyph:")) {@@ -338,7 +351,7 @@ public class ClipTool : Tool { 			if (p.has_prefix ("path:")) { 				p = p.replace ("path: ", ""); 				p = p.replace ("\n", "");-				import_birdfont_path (glyph, p);+				path = import_birdfont_path (glyph, p); 			} 			 			if (p.has_prefix ("left:")) {@@ -352,6 +365,10 @@ public class ClipTool : Tool { 				glyph.remove_lines (); 				glyph.add_help_lines ();	 			}+			+			if (p.has_prefix ("stroke:")) {+				path.stroke = double.parse (p.replace ("stroke: ", ""));+			} 		} 		 		if (!overview) {@@ -380,7 +397,7 @@ public class ClipTool : Tool { 		} 	} 	-	static void import_birdfont_path (Glyph glyph, string data) {+	static Path import_birdfont_path (Glyph glyph, string data) { 		Path path = new Path (); 		 		BirdFontFile.parse_path_data (data, path);@@ -402,6 +419,7 @@ public class ClipTool : Tool { 		} 		 		PenTool.update_selection ();+		return path; 	} 	 	static void paste_letters_to_kerning_tab () {diff --git a/libbirdfont/ForesightTool.vala b/libbirdfont/ForesightTool.valaindex 2b3f020..311ca67 100644--- a/libbirdfont/ForesightTool.vala+++ b/libbirdfont/ForesightTool.vala@@ -204,7 +204,7 @@ public class ForesightTool : Tool { 			last_move_y = y;  			a = get_active_path ();-			if (a.is_open ()) {+			if (a.is_open () && a.points.size > 1) { 				a.get_first_point ().set_reflective_handles (false); 				a.get_first_point ().set_tie_handle (false); 			}

Contact

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