"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "fontbox/src/main/java/org/apache/fontbox/cff/Type1CharString.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

Type1CharString.java  (pdfbox-2.0.23-src):Type1CharString.java  (pdfbox-2.0.24-src)
skipping to change at line 245 skipping to change at line 245
else if ("rrcurveto".equals(name)) else if ("rrcurveto".equals(name))
{ {
if (numbers.size() >= 6) if (numbers.size() >= 6)
{ {
rrcurveTo(numbers.get(0), numbers.get(1), numbers.get(2), rrcurveTo(numbers.get(0), numbers.get(1), numbers.get(2),
numbers.get(3), numbers.get(4), numbers.get(5)); numbers.get(3), numbers.get(4), numbers.get(5));
} }
} }
else if ("closepath".equals(name)) else if ("closepath".equals(name))
{ {
closepath(); closeCharString1Path();
} }
else if ("sbw".equals(name)) else if ("sbw".equals(name))
{ {
if (numbers.size() >= 3) if (numbers.size() >= 3)
{ {
leftSideBearing = new Point2D.Float(numbers.get(0).floatValue(), numbers.get(1).floatValue()); leftSideBearing = new Point2D.Float(numbers.get(0).floatValue(), numbers.get(1).floatValue());
width = numbers.get(2).intValue(); width = numbers.get(2).intValue();
current.setLocation(leftSideBearing); current.setLocation(leftSideBearing);
} }
} }
skipping to change at line 462 skipping to change at line 462
else else
{ {
path.curveTo(x1, y1, x2, y2, x3, y3); path.curveTo(x1, y1, x2, y2, x3, y3);
} }
current.setLocation(x3, y3); current.setLocation(x3, y3);
} }
/** /**
* Close path. * Close path.
*/ */
private void closepath() private void closeCharString1Path()
{ {
if (path.getCurrentPoint() == null) if (path.getCurrentPoint() == null)
{ {
LOG.warn("closepath without initial moveTo in font " + fontName + ", glyph " + glyphName); LOG.warn("closepath without initial moveTo in font " + fontName + ", glyph " + glyphName);
} }
else else
{ {
path.closePath(); path.closePath();
} }
path.moveTo(current.getX(), current.getY()); path.moveTo(current.getX(), current.getY());
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)