The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix character set selection and free hand drawing with stroke

These changes was commited to the Birdfont repository Wed, 13 May 2015 14:00:46 +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>
Wed, 13 May 2015 14:00:46 +0000 (16:00 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 13 May 2015 14:00:46 +0000 (16:00 +0200)
commit f5d88fb57de0bff042b1c529588ca9802cc95a1f
tree dd521906a4da31ebce277f4553b2e3294b3d1813
parent 4f5351ae36460c7337495a12bd68de87e8076f31
Fix character set selection and free hand drawing with stroke

libbirdfont/LanguageSelectionTab.vala
libbirdfont/StrokeTool.vala
libbirdfont/TrackTool.vala
--- a/libbirdfont/LanguageSelectionTab.vala +++ b/libbirdfont/LanguageSelectionTab.vala @@ -46,6 +46,8 @@ void select_language (int row) { string iso_code; + OverView overview; + GlyphRange gr; TabBar tb = MainWindow.get_tab_bar (); return_if_fail (0 <= row < DefaultLanguages.codes.size); @@ -53,7 +55,13 @@ iso_code = DefaultLanguages.codes.get (row); Preferences.set ("language", iso_code); tb.close_display (this); - Toolbox.select_tool_by_name ("custom_character_set"); + + overview = MainWindow.get_overview (); + gr = new GlyphRange (); + DefaultCharacterSet.use_default_range (gr); + overview.set_glyph_range (gr); + OverviewTools.update_overview_characterset (); + FontDisplay.dirty_scrollbar = true; } public override string get_label () {
--- a/libbirdfont/StrokeTool.vala +++ b/libbirdfont/StrokeTool.vala @@ -1998,6 +1998,13 @@ side1 = new Path (); side2 = new Path (); + + foreach (EditPoint ph in path.points) { + if (ph.type == PointType.HIDDEN) { + ph.type = PointType.CUBIC; + } + } + path.remove_deleted_points (); if (path.points.size < 2) { return pl;
--- a/libbirdfont/TrackTool.vala +++ b/libbirdfont/TrackTool.vala @@ -221,6 +221,8 @@ foreach (EditPoint e in p.points) { if (e.type == PointType.HIDDEN) { e.type = DrawingTools.point_type; + e.get_right_handle ().type = DrawingTools.point_type; + e.get_left_handle ().type = DrawingTools.point_type; } } }