Skip to content

Commit e02b103

Browse files
committed
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #320
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1929652 13f79535-47bb-0310-9956-ffa450edef68
1 parent 23388ef commit e02b103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fontbox/src/main/java/org/apache/fontbox/ttf/GlyphRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private GeneralPath calculatePath(Point[] points)
100100
{
101101
Point firstPoint = points[start];
102102
Point lastPoint = points[p];
103-
List<Point> contour = new ArrayList<>();
103+
List<Point> contour = new ArrayList<>((p - start) + 3);
104104
for (int q = start; q <= p; ++q)
105105
{
106106
contour.add(points[q]);

0 commit comments

Comments
 (0)