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 th...@kodak.com on 2008/02/06 01:55:18 UTC

Re: Computer Modern Fonts and ttf2svg

Hi Manuel,

"Manuel Strehl" <Ma...@physik.uni-regensburg.de> wrote on 
12/28/2007 03:03:23 PM:

> I tried to convert some TrueType fonts to SVG via ttf2svg (using 
> Batik 1.7). It works fine for other TTFs, but when it comes to the 
> Computer Modern fonts from CTAN, the program fails with the error 
> appended to this mail.
> 
> My question: Is this a problem of the font or of ttf2svg?

   It the simplest form it's likely a bug in ttf2svg.  However,
TrueType is so complex that using obscure features can often
cause difficulties.  You might try something like font forge
to either directly generate the SVG or to generate a potentially
more vanilla TT font.

> PS: If someone knows another SVG version of Computer Modern than <
> http://goossens.home.cern.ch/goossens/svgfonts.html>, this would be 
> great! The problem is mainly the character encoding there.
> 
> The error message:
> 
> $ ttf2svg cmr10.ttf
> java.io.EOFException
>         at java.io.RandomAccessFile.readInt(Unknown Source)
>         at org.apache.batik.svggen.font.table.Os2Table.<init>(Unknown 
Source)
>         at org.apache.batik.svggen.font.table.TableFactory.
> create(Unknown Source)
>         at org.apache.batik.svggen.font.Font.read(Unknown Source)
>         at org.apache.batik.svggen.font.Font.create(Unknown Source)
>         at org.apache.batik.svggen.font.SVGFont.main(Unknown Source)
>         at org.apache.batik.apps.ttf2svg.Main.main(Unknown Source)
> <Xxml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-
> //W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-
> SVG-20010904/DTD/svg10.dtd" > <svg
>  xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
> <defs >
> java.lang.NullPointerException
>         at org.apache.batik.svggen.font.SVGFont.
> writeFontAsSVGFragment(Unknown Source)
>         at org.apache.batik.svggen.font.SVGFont.main(Unknown Source)
>         at org.apache.batik.apps.ttf2svg.Main.main(Unknown Source)
> null
> usage: java org.apache.batik.svggen.font.SVGFont <ttf-path> [-l 
> <range-begin>] [-h <range-end>] [-autorange] [-ascii] [-id <id>] [-o
> <output-path>] [-
> testcard]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>