Commit 27a718a
Merge new spacing classes with kerning classes
Changed files (3)
modifiedlibbirdfont/KerningRange.valamodifiedlibbirdfont/KerningTools.valamodifiedlibbirdfont/SpacingClassTab.vala
Diff
@@ -57,6 +57,10 @@ public class KerningRange : Tool { }); } + public void update_spacing_class () {+ set_ranges (ranges);+ }+ public void set_ranges (string r) { GlyphRange glyph_range = new GlyphRange (); string new_range;@@ -69,7 +73,9 @@ public class KerningRange : Tool { ch = glyph_range.get_char (i); foreach (string c in MainWindow.get_spacing_class_tab ().get_all_connections (ch)) {- new_range += " " + GlyphRange.serialize (c);+ if (!glyph_range.has_character (c) && c != "" && c != "?") {+ new_range += " " + GlyphRange.serialize (c);+ } } } @@ -185,7 +185,7 @@ public class KerningTools : ToolCollection { MainWindow.get_toolbox ().update_expanders (); } }- + public static void remove_empty_classes () { KerningRange kr; int i;@@ -213,6 +213,21 @@ public class KerningTools : ToolCollection { public override Gee.ArrayList<Expander> get_expanders () { return expanders; }+ + public static void update_spacing_classes () { + KerningRange kr;+ + if (classes.tool.size == 0) {+ return;+ }++ foreach (Tool t in classes.tool) {+ return_if_fail (t is KerningRange);+ + kr = (KerningRange) t;+ kr.update_spacing_class ();+ }+ } } }@@ -99,6 +99,8 @@ public class SpacingClassTab : FontDisplay { gc.get_current ().update_spacing_class (); } }+ + KerningTools.update_spacing_classes (); } public void selected_row (Row row, int column, bool delete_button) {