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 lb...@ca.ibm.com on 2002/03/04 23:47:49 UTC

ttf2svg problem

Hi,

I'm struggling to convert one character from a given TTF (arial in this
case) file into SVG.
The character gets converted, but when I open the SVG using IE5.5 or even
the Batik browser, I see nothing.

The command I have used is:
java -jar batik-ttf2svg.jar C:\WINNT\Fonts\arial.ttf -l 48 -h 49 -id
MySVGFont -o mySVGFont.svg

The resulted SVG file is pretty big (42k). It has got tons of tags similar
to this :
<hkern g1="space" g2="Delta" k="-113" />
I would have expected something a lot smaller.

Any help is appreciated.


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


Re: ttf2svg problem

Posted by Chris Lilley <ch...@w3.org>.
On Monday, March 04, 2002, 11:47:49 PM, lbenedek wrote:

lcic> Hi,

lcic> I'm struggling to convert one character from a given TTF (arial in this
lcic> case) file into SVG.
lcic> The character gets converted, but when I open the SVG using IE5.5 or even
lcic> the Batik browser, I see nothing.

lcic> The command I have used is:
lcic> java -jar batik-ttf2svg.jar C:\WINNT\Fonts\arial.ttf -l 48 -h 49 -id
lcic> MySVGFont -o mySVGFont.svg

You need a -testcard if you want to see something, otherwise it makes
the font, for use by other files or for inclusion in another file, but
there is nothing to see.

lcic> The resulted SVG file is pretty big (42k). It has got tons of tags similar
lcic> to this :
lcic> <hkern g1="space" g2="Delta" k="-113" />
lcic> I would have expected something a lot smaller.

How many glyph elements does it have?  I'm guessing two.

Sounds like the -l and -h ranges result in subsetting of the glyphs
but do not trigger subsetting of kern pairs. Adding that to the code
should not be especially hard.

Meanwhile, you can strip out most of the kern pairs - in fact, if you
only want one glyph, you don't need any kern pairs at all.

-- 
 Chris                            mailto:chris@w3.org


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