The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Move path along handle on TTF grid

These changes was commited to the Birdfont repository Fri, 17 Oct 2014 16:44:57 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 17 Oct 2014 16:44:57 +0000 (18:44 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 17 Oct 2014 16:44:57 +0000 (18:44 +0200)
commit ae7e78b0cb7a9baca70db8fa98fdecbcc030a2b1
tree 43f35c7472993363d54e652102af422346377ab0
parent d7619e1d6daa046015c01d516867cde773feab28
Move path along handle on TTF grid

libbirdfont/BirdFont.vala
libbirdfont/ExportTool.vala
libbirdfont/PenTool.vala
libbirdfont/Toolbox.vala
--- a/libbirdfont/BirdFont.vala +++ b/libbirdfont/BirdFont.vala @@ -711,10 +711,10 @@ f += s; } - printd (@"File: Directory: $f Name: $n)\n"); + printd (@"File: Directory: $f Name: $n\n"); return File.new_for_path (f + n); } }
--- a/libbirdfont/ExportTool.vala +++ b/libbirdfont/ExportTool.vala @@ -372,8 +372,14 @@ public static bool export_ttf_font () { Font font = BirdFont.get_current_font (); - File file = font.get_folder (); - return export_ttf_font_path (file); + File f = font.get_folder (); + + printd (@"export_ttf_font:\n"); + printd (@"font.get_path (): $(font.get_path ())\n"); + printd (@"font.get_folder_path (): $(font.get_folder_path ())\n"); + printd (@"font.get_folder (): $((!) f.get_path ())\n"); + + return export_ttf_font_path (f); } public static bool export_ttf_font_path (File folder) {
--- a/libbirdfont/PenTool.vala +++ b/libbirdfont/PenTool.vala @@ -65,7 +65,7 @@ private static ImageSurface? tie_icon = null; - /** First move action must move the current point in to the grid. */ + /* First move action must move the current point in to the grid. */ bool first_move_action = false; /** Move curve handle instead of control point. */ @@ -651,6 +651,8 @@ coordinate_x = Glyph.path_coordinate_x (x); coordinate_y = Glyph.path_coordinate_y (y); + GridTool.ttf_grid_coordinate (ref coordinate_x, ref coordinate_y); + if (selected_point.tie_handles && KeyBindings.modifier == SHIFT) { if (first_move_action) { @@ -661,7 +663,6 @@ move_point_on_handles (coordinate_x, coordinate_y, out coordinate_x, out coordinate_y); } - GridTool.ttf_grid_coordinate (ref coordinate_x, ref coordinate_y); delta_coordinate_x = coordinate_x - last_point_x; delta_coordinate_y = coordinate_y - last_point_y; @@ -802,7 +803,9 @@ last_selected_is_handle = false; } - if (selected_points.size == 0 && !active_handle.active) { + if (!KeyBindings.has_shift () + && selected_points.size == 0 + && !active_handle.active) { show_selection_box = true; } @@ -918,7 +921,7 @@ if (active_edit_point != null) { if (KeyBindings.modifier == SHIFT) { - if (((!)active_edit_point).is_selected ()) { + if (((!)active_edit_point).is_selected () && selected_points.size > 1) { ((!)active_edit_point).set_selected (false); remove_from_selected ((!)active_edit_point); selected_point = new EditPoint ();
--- a/libbirdfont/Toolbox.vala +++ b/libbirdfont/Toolbox.vala @@ -95,7 +95,7 @@ warn_if_test ("Event suppressed"); return; } - + foreach (Expander exp in current_set.get_expanders ()) { foreach (Tool t in exp.tool) { t.set_active (false);