[
https://issues.apache.org/jira/browse/FOP-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18124655#comment-18124655
]
Jason Harrop commented on FOP-2349:
-----------------------------------
An FO with a font from the test tree: attached FOP-2349-letter-spacing-width.fo
and fop-test-fonts.xconf. Copy the config to the root of a checkout and run
from there, once as is and once with complex scripts off:
{noformat}
fop -c fop-test-fonts.xconf -fo FOP-2349-letter-spacing-width.fo -pdf cs.pdf
fop -c fop-test-fonts.xconf -nocs -fo FOP-2349-letter-spacing-width.fo -pdf
nocs.pdf
pdftotext -bbox cs.pdf - ; pdftotext -bbox nocs.pdf -
{noformat}
One block of 29 words in DejaVuLGCSerif, 12pt, {{letter-spacing="3pt"}}, in a
region 260pt wide (20pt to 280pt).
On main at 5be8c69b6 the complex-script path breaks it into 5 lines ending at
302.6, 298.8, 298.7 and 302.8pt: 22pt past the region's end, because the lines
are measured without the letter spaces and most words are painted with them.
With -nocs the same text makes 6 lines, ending at 257.0, 262.5, 241.1, 226.3,
264.7 and 209.8pt, all inside.
With pull requests 113 (FOP-3344) and 118 the complex-script path gives the
same 6 lines, ending at 257.0, 262.5, 237.8, 226.3, 264.7 and 209.8pt; the
3.3pt on the third line is GPOS kerning, which -nocs does not apply.
> Inline elements with letter-spacing and custom font aren't correctly sized
> --------------------------------------------------------------------------
>
> Key: FOP-2349
> URL: https://issues.apache.org/jira/browse/FOP-2349
> Project: FOP
> Issue Type: Bug
> Components: layout/unqualified
> Reporter: Matthias Reischenbacher
> Priority: Major
> Attachments: FOP-2349-letter-spacing-width.fo, FOP-2349.fo,
> fop-test-fonts.xconf, inline-letter-spacing.pdf, inline-letter-spacing.xml
>
>
> If letter-spacing is applied to an inline element, that uses one of the
> base-14 fonts, the width of the inline element is automatically expanded with
> the letter-spacing.
> However if a custom font is used (e.g. Arial) the inline width isn't expanded
> anymore, which prevents from using background-color or borders for the inline
> element.
> See attached PDF which illustrates the problem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)