The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix zero length handles in Beziér tool

These changes was commited to the Birdfont repository Tue, 15 Aug 2017 13:39:51 +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>
Tue, 15 Aug 2017 13:39:51 +0000 (15:39 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 15 Aug 2017 13:39:51 +0000 (15:39 +0200)
commit 7820cb31f341dabd0a73088027a6393b7d40e5a6
tree a9b9d0ce0d789bb6ca5de339c814fc7ee76816b1
parent 8cc9fd91233c56e8e293b5fbd1f61a4afbe126ec
Fix zero length handles in Beziér tool

libbirdfont/BezierTool.vala
--- a/libbirdfont/BezierTool.vala +++ b/libbirdfont/BezierTool.vala @@ -309,9 +309,12 @@ EditPoint first, last; first = current_path.get_first_point (); - + + first.tie_handles = false; + first.reflective_point = false; + if (first.get_left_handle ().length == 0) { - first.get_left_handle ().convert_to_line (); + first.get_left_handle ().length = 0.001; } if (first.get_right_handle ().length == 0) { @@ -319,9 +322,12 @@ } last = current_path.get_last_point (); - + + last.tie_handles = false; + last.reflective_point = false; + if (last.get_left_handle ().length == 0) { - last.get_left_handle ().convert_to_line (); + last.get_left_handle ().length = 0.001; } if (last.get_right_handle ().length == 0) {