Commit da963e4
don't tie handles in svg import
Changed files (2)
Diff
@@ -214,7 +214,9 @@ public class EditPoint { angle = -acos (a / length) + PI; } - if (left_handle.type == PointType.QUADRATIC) {+ if (left_handle.type == PointType.QUADRATIC + || right_handle.type == PointType.QUADRATIC) {+ prev_rh = get_prev ().data.get_right_handle (); next_lh = get_next ().data.get_left_handle (); @@ -235,16 +237,20 @@ public class EditPoint { prev_rh.type = PointType.DOUBLE_CURVE; left_handle.type = PointType.DOUBLE_CURVE; right_handle.type = PointType.DOUBLE_CURVE;- } else if (left_handle.type == PointType.LINE_DOUBLE_CURVE) {+ } else if (left_handle.type == PointType.LINE_DOUBLE_CURVE + || right_handle.type == PointType.LINE_DOUBLE_CURVE) {+ left_handle.type = PointType.DOUBLE_CURVE; right_handle.type = PointType.DOUBLE_CURVE; prev_rh = get_prev ().data.get_right_handle (); next_lh = get_next ().data.get_left_handle (); - prev_rh.type = PointType.DOUBLE_CURVE; + prev_rh.type = PointType.DOUBLE_CURVE; next_lh.type = PointType.DOUBLE_CURVE;- } else if (left_handle.type == PointType.LINE_CUBIC) {+ } else if (left_handle.type == PointType.LINE_CUBIC+ || right_handle.type == PointType.LINE_CUBIC) {+ left_handle.type = PointType.CUBIC; right_handle.type = PointType.CUBIC; }@@ -805,7 +805,6 @@ public class ImportSvg { path.points.remove_link (path.points.last ()); } - set_tied_handles (path); glyph.add_path (path); glyph.close_path (); @@ -838,20 +837,6 @@ public class ImportSvg { return double.try_parse ((!) s); }- - static void set_tied_handles (Path path) {- double a, b;- double d;- - foreach (EditPoint p in path.points) {- a = p.get_left_handle ().angle;- b = p.get_right_handle ().angle;- d = a - b;- if (fabs (d) - PI < 0.001) {- p.set_tie_handle (true);- }- }- } } }