xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Kerning and hyphenation
Date Mon, 15 Jan 2007 08:56:35 GMT

On 13.01.2007 06:32:15 Manuel Mall wrote:
> While looking into the support for the Soft Hyphen the area of 
> hyphenation combined with kerning is causing me trouble.
> 
> Aside 1: our fonts page claims we don't support kerning but I believe we 
> do.

Yes, we do.

> Aside 2: Our tests are based on setting the base14kerning flag. I don't 
> think this flag is documented anywhere on the fop site. Can it be set 
> in the config file?

Not yet, no, only through the FopFactory.

> I wrote a simple test under fop 0.93 and noticed that the ipd of text 
> areas with the combination of kerning and hyphenation are not correctly 
> calculated (at least I think so). With the Base 14 sans-serif font at 
> 20pt we get:
> 
> Word "vanda" alone on a line: ipd=53980
> Word "vandavanda" alone on a line: ipd=107560 (53980+53980-400)
> Word "vandavandavanda" alone on a line: ipd=161140 
> (53980+53980+53980-400-400)
> If we now take the word "vandavandavandavanda" and get it hyphenated 
> after the 3rd "vanda" the line containing "vandavandavanda-" reports an 
> ipd of 168800 which is incorrect. I think it should be 161140 + 6660 
> (width of hyphen) = 167800.

I think you mean it is 168600 (that's what I get) and it should be
167800, which is a difference of 800mpt. 800mpt looks much like two
times 400mpt kerning which are not removed from the area objects's IPD
for the break at a hyphenation point. However, I'd expect a difference
of only 400mpt, not 800mpt. I did fix [1] the behaviour for that
condition so the layout looks correct, but apparently I didn't adjust
the IPD for the area object.

[1] http://svn.apache.org/viewvc?rev=407774&view=rev

> Before I investigate this more can someone else check this and see if 
> they get similar results.
> 
> I have attached the test case I have constructed.
> 
> Manuel
> 
> 
> 



Jeremias Maerki


Mime
View raw message