Commit ea8f1e7
Export open paths Special fonts needs this.
Changed files (2)
Diff
@@ -180,7 +180,8 @@ void create_contour (guint unicode, FT_Vector* points, char* flags, int* length, i++; } - if (len > 2 && is_quadratic (flags[0]) && !is_quadratic (flags[1])) { // first point is of curve but it is not part of a double curve+ // first point is of curve but it is not part of a double curve+ if (len > 2 && is_quadratic (flags[0]) && !is_quadratic (flags[1])) { first_normal_off_curve = TRUE; } @@ -385,11 +386,13 @@ GString* get_bf_contour_data (guint unicode, FT_Vector* points, char* flags, int gchar* coordinate = (gchar*) &coordinate_buffer; double units = get_units (units_per_em); guint prev_is_curve;+ int points_length; if (length == 0) { return bf; } + points_length = length; create_contour (unicode, points, flags, &length, &new_points, &new_flags, err); x0 = new_points[0].x * units;@@ -47,13 +47,15 @@ public class PointConverter { PenTool.convert_point_segment_type (e, e.get_next (), PointType.DOUBLE_CURVE); } }- - if (quadratic_path.get_last_point ().get_right_handle ().type == PointType.CUBIC) {- PenTool.convert_point_segment_type (quadratic_path.get_last_point (),- quadratic_path.get_first_point (),- PointType.DOUBLE_CURVE);+ + if (!original_path.is_open ()) {+ if (quadratic_path.get_last_point ().get_right_handle ().type == PointType.CUBIC) {+ PenTool.convert_point_segment_type (quadratic_path.get_last_point (),+ quadratic_path.get_first_point (),+ PointType.DOUBLE_CURVE);+ } }- + quadratic_path.add_hidden_double_points (); return quadratic_path;@@ -76,6 +78,11 @@ public class PointConverter { size = quadratic_path.points.size; segment_start = quadratic_path.get_first_point ();+ + if (original_path.is_open ()) {+ size--;+ }+ for (int i = 0; i < size; i++) { segment_stop = (i == size -1) ? quadratic_path.get_first_point ()