Clone in a terminal:
Commit a031f6c
Johan Mattsson - 2015-10-02T13:51:43+00:00
a031f6c5db1a3622fc82d71d0488cb2de2c42243johan.mattsson.m@gmail.com

Tools for inserting glyphs in the spacing tab

Changed files (3)

Diff

diff --git a/libbirdfont/BirdFontFile.vala b/libbirdfont/BirdFontFile.valaindex 8a32984..279ec4a 100644--- a/libbirdfont/BirdFontFile.vala+++ b/libbirdfont/BirdFontFile.vala@@ -198,7 +198,7 @@ class BirdFontFile : GLib.Object { 			foreach (string alt in alternate.alternates) { 				os.put_string (@"<alternate "); 				os.put_string (@"glyph=\"$glyph_name\" ");-				os.put_string (@"alternate=\"$alt\" ");+				os.put_string (@"replacement=\"$alt\" "); 				os.put_string (@"tag=\"$(tag)\" />\n"); 			} 		}@@ -841,7 +841,7 @@ class BirdFontFile : GLib.Object { 				glyph_name = unserialize (attribute.get_content ()); 			} 			-			if (attribute.get_name () == "alternate") {+			if (attribute.get_name () == "replacement") { 				alt = unserialize (attribute.get_content ()); 			} diff --git a/libbirdfont/LabelTool.vala b/libbirdfont/LabelTool.valaindex 4f31de8..92b2242 100644--- a/libbirdfont/LabelTool.vala+++ b/libbirdfont/LabelTool.vala@@ -43,12 +43,13 @@ public class LabelTool : Tool { 		double text_height; 		 		base ();--		this.label = label;-		this.number = "-"; 		 		label_text = new Text (); 		label_text.set_text (label);+		+		this.label = label;+		this.number = "-";+ 		text_height = 17 * Toolbox.get_scale (); 		label_text.set_font_size (text_height); diff --git a/libbirdfont/SpacingTools.vala b/libbirdfont/SpacingTools.valaindex 94edbf6..0ba33e4 100644--- a/libbirdfont/SpacingTools.vala+++ b/libbirdfont/SpacingTools.vala@@ -48,6 +48,30 @@ public class SpacingTools : ToolCollection  { 		zoom_expander.add_tool (zoom_bar); 		 		Expander spacing_tools_expander = new Expander ();+		+		Tool insert_last = new Tool ("insert_glyph_from_overview", t_("Insert glyph from overview"));+		insert_last.select_action.connect ((self) => {+			SpacingTab d = MainWindow.get_spacing_tab ();+			GlyphSelection gs = new GlyphSelection ();+			+			gs.selected_glyph.connect ((gc) => {+				d.inser_glyph (gc.get_current ());+				MainWindow.get_tab_bar ().select_tab_name ("Spacing");+			});+			+			GlyphCanvas.set_display (gs);+			self.set_selected (false);+		});+		spacing_tools_expander.add_tool (insert_last);++		Tool insert_unicode = new Tool ("insert_unichar", t_("Insert character by unicode value"));+		insert_unicode.select_action.connect ((self) => {+			SpacingTab d = MainWindow.get_spacing_tab ();+			d.insert_unichar ();+			self.set_selected (false);+		});+		spacing_tools_expander.add_tool (insert_unicode);+ 		spacing_tools_expander.add_tool (KerningTools.previous_kerning_string); 		spacing_tools_expander.add_tool (KerningTools.next_kerning_string); 		

Contact

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