Bug 43089 - [PATCH] PDFRenderer - text-decoration (e.g. underline) not being renderered with Type1 fonts
Summary: [PATCH] PDFRenderer - text-decoration (e.g. underline) not being renderered w...
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: fonts (show other bugs)
Version: trunk
Hardware: Other other
: P1 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 08:31 UTC by Adrian Cumiskey
Modified: 2012-04-01 07:02 UTC (History)
0 users



Attachments
patch file (1.45 KB, patch)
2007-08-10 08:34 UTC, Adrian Cumiskey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Cumiskey 2007-08-10 08:31:11 UTC
I'm a little surprised that no-one hasn't come across this bug sooner, but I
managed to verify its existence and provide a patch that seems to fix the
problem.  I guess its not been discovered because most PDF renderer users must
favour using truetype fonts.

A positive descender value was being used on type 1 fonts when calculating the
line width for text-decoration(s).  This was causing a negative line width, 
resulting in the decoration line not being drawn by the PDF renderer.  This
patch fixes this problem.  I have successfully tested the patch against a
reasonably complex FO example with both the postscript and pdf renderer to try
and ensure it does not break anything.  You can just as easily reproduce the
problem with a simple "hello world!" fo example with a single block (using
text-decoration, referencing a type 1 font-family).

Ideally it would be nice to have a JUnit test case to verify this fix against
but I'm not sure about legal licensing issues with acquiring some free (GPL)
type 1 fonts.

Adrian.
Comment 1 Adrian Cumiskey 2007-08-10 08:34:28 UTC
Created attachment 20639 [details]
patch file

* Improves error log output in PDFRender.drawBorderLine().
* Fixes descender calculation used from PFMFile.
Comment 2 Chris Bowditch 2007-08-17 09:07:10 UTC
Patch Applied. Excellent work Adrian!
Comment 3 Glenn Adams 2012-04-01 07:02:54 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed