You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/02/18 04:12:00 UTC
[jira] [Commented] (PDFBOX-5567) Font gets smaller for each rendered page
[ https://issues.apache.org/jira/browse/PDFBOX-5567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690680#comment-17690680 ]
ASF subversion and git services commented on PDFBOX-5567:
---------------------------------------------------------
Commit 1907727 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1907727 ]
PDFBOX-5567: clone to avoid modification on cached path, as suggested by Oliver Schmidtmer
> 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
> 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