diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 2bb7984f7..1dd2338a9 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -95,7 +95,8 @@ struct Glyph break; } case SIMPLE: - if (unlikely (!SimpleGlyph (*header, bytes).get_contour_points (points, phantom_only))) + /* Load into all_points if it's empty, as an optimization. */ + if (unlikely (!SimpleGlyph (*header, bytes).get_contour_points (all_points.length == 0 ? all_points : points, phantom_only))) return false; break; }