src/hb-shape-plan.cc | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-)
New commits: commit 77bd0a6458a9169df59f6be667a8eb79bd353dc9 Author: Behdad Esfahbod <[email protected]> Date: Sun Nov 11 22:08:48 2018 -0500 Add variation coords to shape_plan proposal This is the root cause of bug worked around in 19e77e01bc13f44138e1d50533327d314dd0a018. Still no shape plan caching for variations though. diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index d4288046..2a2e0e39 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -481,6 +481,8 @@ hb_shape_plan_create_cached2 (hb_face_t *face, shaper_list, user_features, num_user_features, + coords, + num_coords, nullptr }; commit 9c767d075d0be85227b8dc146061de9bd24f3fec Author: Behdad Esfahbod <[email protected]> Date: Sun Nov 11 22:03:15 2018 -0500 Minor diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index 5579ded7..d4288046 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -146,27 +146,21 @@ hb_shape_plan_create2 (hb_face_t *face, hb_feature_t *features = nullptr; int *coords = nullptr; - if (unlikely (!face)) - face = hb_face_get_empty (); if (unlikely (!props)) - return hb_shape_plan_get_empty (); + goto bail; if (num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t)))) - return hb_shape_plan_get_empty (); + goto bail; if (num_coords && !(coords = (int *) calloc (num_coords, sizeof (int)))) - { - free (features); - return hb_shape_plan_get_empty (); - } + goto bail; if (!(shape_plan = hb_object_create<hb_shape_plan_t> ())) - { - free (coords); - free (features); - return hb_shape_plan_get_empty (); - } + goto bail; assert (props->direction != HB_DIRECTION_INVALID); + if (unlikely (!face)) + face = hb_face_get_empty (); hb_face_make_immutable (face); + shape_plan->custom_shaper_list = shaper_list; shape_plan->face_unsafe = face; shape_plan->props = *props; @@ -189,13 +183,14 @@ hb_shape_plan_create2 (hb_face_t *face, num_user_features, coords, num_coords))) - { - free (coords); - free (features); - return hb_shape_plan_get_empty (); - } + goto bail; return shape_plan; + +bail: + free (coords); + free (features); + return hb_shape_plan_get_empty (); } /** _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
