You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Oliver Schmidtmer (Jira)" <ji...@apache.org> on 2023/02/17 19:11:00 UTC
[jira] [Created] (PDFBOX-5567) Font gets smaller for each rendered page
Oliver Schmidtmer created PDFBOX-5567:
-----------------------------------------
Summary: Font gets smaller for each rendered page
Key: PDFBOX-5567
URL: https://issues.apache.org/jira/browse/PDFBOX-5567
Project: PDFBox
Issue Type: Bug
Reporter: Oliver Schmidtmer
Fix For: 2.0.27
Attachments: Rechnung_001 (1).pdf, image-2023-02-17-20-06-11-031.png, image-2023-02-17-20-06-41-326.png
Every time the page in the attached document is re-rendered, the font gets smaller.
First rendering:
!image-2023-02-17-20-06-11-031.png!
Second rendering:
!image-2023-02-17-20-06-41-326.png!
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
{code:java}
GeneralPath glyph = vectorFont.getPath(code);
{code}
is rescaled in
{code:java}
if (hasScaling)
{
AffineTransform atScale = AffineTransform.getScaleInstance(scale, scale);
glyphPath.transform(atScale);
}
{code}
This should probably be done on a cloned path.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org