You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/02/18 04:23:00 UTC
[jira] [Resolved] (PDFBOX-5567) Font gets smaller for each rendered page
[ https://issues.apache.org/jira/browse/PDFBOX-5567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr resolved PDFBOX-5567.
-------------------------------------
Assignee: Tilman Hausherr
Resolution: Fixed
Thank you [~Schmidor] for your report and solution!
> Font gets smaller for each rendered page
> ----------------------------------------
>
> Key: PDFBOX-5567
> URL: https://issues.apache.org/jira/browse/PDFBOX-5567
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.27, 3.0.0 PDFBox
> Reporter: Oliver Schmidtmer
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.28, 3.0.0 PDFBox
>
> 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