From 8a92ffd9bb9357cdf219e166c8a71abc90823976 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Fri, 5 Apr 2019 15:04:23 -0700 Subject: [PATCH 1/2] fix failure to check glyf recursion --- src/hb-ot-glyf-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 5be1eadf9..5016c36c1 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -621,7 +621,7 @@ struct glyf { contour_point_vector_t comp_points; if (unlikely (!get_points_var (composite.current->glyphIndex, coords, coord_count, - comp_points))) return false; + comp_points, depth))) return false; /* Apply component transformation & translation */ composite.current->transform_points (comp_points); From 196481ccb913d23e30cbd267df296deada919e88 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Fri, 5 Apr 2019 16:37:12 -0700 Subject: [PATCH 2/2] shift glyph horizontally at top level, not components --- src/hb-ot-glyf-table.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-glyf-table.hh b/src/hb-ot-glyf-table.hh index 5016c36c1..f3d7a72bd 100644 --- a/src/hb-ot-glyf-table.hh +++ b/src/hb-ot-glyf-table.hh @@ -648,6 +648,7 @@ struct glyf } while (composite.move_to_next()); } + if (depth == 1) /* Shift at top level only */ { /* Undocumented rasterizer behavior: * Shift points horizontally by the updated left side bearing