Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.27, 3.0.0 PDFBox
-
None
Description
Every time the page in the attached document is re-rendered, the font gets smaller.
First rendering:
Second rendering:
Reloading the complete document resets the font size.
This is probably caused in TTFGlyph2D.getPathForGID
The problematic text rendering uses scaling,
so the path gotten in the line
GeneralPath glyph = vectorFont.getPath(code);
is rescaled in
if (hasScaling)
{
AffineTransform atScale = AffineTransform.getScaleInstance(scale, scale);
glyphPath.transform(atScale);
}
This should probably be done on a cloned path.