You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Jonas Fleer <jo...@spreadshirt.net> on 2008/07/17 18:48:32 UTC

Problem with Kerning

Hi,

i have a problem with kerning in this document[1]. Squiggle and the 
Transcoder example given on 
http://xmlgraphics.apache.org/batik/using/transcoder.html#createImage 
both create an image whose text doesn't have any kerning. But when i 
preview the SVG with Firefox3 for example, there is kerning (see image 
links [2-4] given below).

Any hints why Batik doesn't render with kerning?
My system: Mac OSX 10.5, Java 1.5, Batik 1.7

Thanks in advance.

Jonas

[1] http://www.jfleer.de/test.svg
[2] http://www.jfleer.de/test_firefox.png
[3] http://www.jfleer.de/test_squiggle.png
[4] http://www.jfleer.de/test_transcoder.jpg

-- 
Jonas Fleer
Software Engineering

sprd.net AG
Rosenthaler Straße 42
D-10178 Berlin

Vorstand/Managing Directors:
   Jana Eggers (Vorsitzende, CEO)
   Matthias C. Spieß
   Andreas Schröteler
Aufsichtsratsvorsitzender/Chairman of the Board:
   Lukasz Gadowski
Handelsregister/Trade Register:
   Amtsgericht Leipzig, HRB 22478
Umsatzsteuer-IdentNummer/VAT-ID:
   DE 8138 7149 4

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Problem with Kerning

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Jonas.

Jonas Fleer:
> i have a problem with kerning in this document[1]. Squiggle and the  
> Transcoder example given on  
> http://xmlgraphics.apache.org/batik/using/transcoder.html#createImage  
> both create an image whose text doesn't have any kerning. But when i  
> preview the SVG with Firefox3 for example, there is kerning (see image  
> links [2-4] given below).
>
> Any hints why Batik doesn't render with kerning?
> My system: Mac OSX 10.5, Java 1.5, Batik 1.7

My understanding is that support for kerning was introduced only in
Java 6.  If you use an AWT font (like you do in your document), then you
won’t get any kerning, regardless of what version of Java you’re running
on, since Batik doesn’t try to use the Java 6 kerning support.

If you use an SVG font with <hkern> elements then you will get kerning,
since the spacing adjustment is done by code within Batik.  You can
convert the font you are using, Times, to an SVG font with the ttf2svg
utility included in the distribution.  Using that will get you kerned
glyphs.

I will see if the Java 6 kerning functionality is easily enabled for AWT
fonts.

-- 
Cameron McCormack ≝ http://mcc.id.au/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org