Bug 40529 - [PATCH] Possible bug in PSTextRenderer
Summary: [PATCH] Possible bug in PSTextRenderer
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: ps (show other bugs)
Version: all
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on: 47000
Blocks:
  Show dependency tree
 
Reported: 2006-09-17 09:29 UTC by Peter Wainwright
Modified: 2012-04-01 13:50 UTC (History)
0 users



Attachments
Initialize aci before makeFont etc. Otherwise it doesn't work. (856 bytes, patch)
2006-09-17 09:30 UTC, Peter Wainwright
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wainwright 2006-09-17 09:29:27 UTC
According to the comment, this class

 * Renders the attributed character iterator of a <tt>TextNode</tt>.
 * This class draws the text directly into the PSGraphics2D so that
 * the text is not drawn using shapes which makes the PS files larger.
 * If the text is simple enough to draw then it sets the font and calls
 * drawString. If the text is complex or the cannot be translated
 * into a simple drawString the StrokingTextPainter is used instead.

However,
The check for unsupported glyphs seems always to use the default font,
When makeFont is called the ACI should be initialized(?) using aci.first(),
otherwise the position is undefined, the attributes (including font)
are therefore null, and the default font is used instead.

This bug seems to be masked in my case since the embedded SVG document I am
rendering has other unsupported attributes so the text has to be stroked
anyway. However, in the course of debugging I came across this and thought
I should mention it.

Could someone who understands this font handling see if this patch is
reasonable:


acro
Comment 1 Peter Wainwright 2006-09-17 09:30:30 UTC
Created attachment 18877 [details]
Initialize aci before makeFont etc. Otherwise it doesn't work.
Comment 2 Jeremias Maerki 2009-04-08 12:43:33 UTC
This should be obsoleted by bug #47000. Sorry that this patch seems to have slipped through the cracks.
Comment 3 Glenn Adams 2012-04-01 13:50:40 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs