Bug 24148 - Kerning upsets text-align="end"
Summary: Kerning upsets text-align="end"
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.5
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
Depends on:
Reported: 2003-10-27 14:39 UTC by Barnaby Shearer
Modified: 2007-04-14 21:50 UTC (History)
0 users

Here is an example showing an exaggerated case of the problem. (2.41 KB, text/xml)
2003-10-27 14:40 UTC, Barnaby Shearer

Note You need to log in before you can comment on or make changes to this bug.
Description Barnaby Shearer 2003-10-27 14:39:18 UTC
I have imported several Type 1 fonts (e.g. Adobe Garamon-book) and fop reads in
and uses the font Kerning information. However the change in width introduced by
the kerning is not correctly taken into account for future items in the same
line of text.

This is most dramatically demonstrated when you have a table will the first
coulomb is a list of names (which include different kerning letter pairs)
followed by a column with text-align="end" (i.e. a spreadsheet with row headings
then coulombs of right-aligned numbers), the alignment in the second column is
noticeable wrong. 

You can demonstrate this is caused by the kerning by manually removing the
kerning information from FOPs xml font file.
Comment 1 Barnaby Shearer 2003-10-27 14:40:54 UTC
Created attachment 8756 [details]
Here is an example showing an exaggerated case of the problem.
Comment 2 J.Pietschmann 2003-10-27 18:20:19 UTC
The problem is that the relevant text width calculation doesn't take kerning
into account, it just uses the character width only. This can screw any
alignment, including centering and justifying.
I don't think this will be fixed in the maintenance branch.