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 Steffen Tiedemann Christensen <st...@infotouch.dk> on 2001/07/30 20:01:07 UTC

Problem converting fonts

Can anyone explain the following problem (and the fix)?

$ /usr/local/j2sdk1.3.1/bin/java -jar /svg/batik/batik-ttf2svg.jar
/fonts/B014003T.TTF
null
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG
20001102//EN"
"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" > <svg
width="100%" height="100%">
<defs >
java.lang.NullPointerException
        at
org.apache.batik.svggen.font.SVGFont.writeFontAsSVGFragment(SVGFont.java:260
)
        at org.apache.batik.svggen.font.SVGFont.main(SVGFont.java:672)
        at org.apache.batik.apps.ttf2svg.Main.main(Main.java:23)
null

Thanks,
Steffen Tiedemann Christensen
steffen@infotouch.dk


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


Re: Problem converting fonts

Posted by Steffen Tiedemann Christensen <st...@infotouch.dk>.
I seems your right (I had no problem converting other fonts), but the
question now is: How do I convert the Adobe font correctly (I realize this
is not the right list, but...)?

Steffen Tiedemann Christensen
steffen@infotouch.dk


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


Re: Problem converting fonts

Posted by "Guy M. Spillman, Jr." <gm...@programmer.net>.
I have seen this same problem with Adobe fonts "converted" to TTF in Windows.  I
am no font expert, but the TTF file that results from this conversion seems to
be nothing more than a wrapper for the original Adobe PFB file.  I base this
opinion on the fact that all of the TTF files converted from PFB's are all 90k
in length (smaller than most original TTF fonts), and the original PFB file must
be present in the Windows FONT directory for the converted font to work.

If this is the case, then I have no fix.  Hopefully someone else can help with
that.  Since your example obviously was executed in Unix/Linux, this may not be
the same problem you are experiencing.

Guy Spillman

Steffen Tiedemann Christensen wrote:

> Can anyone explain the following problem (and the fix)?
>
> $ /usr/local/j2sdk1.3.1/bin/java -jar /svg/batik/batik-ttf2svg.jar
> /fonts/B014003T.TTF
> null
> <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG
> 20001102//EN"
> "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" > <svg
> width="100%" height="100%">
> <defs >
> java.lang.NullPointerException
>         at
> org.apache.batik.svggen.font.SVGFont.writeFontAsSVGFragment(SVGFont.java:260
> )
>         at org.apache.batik.svggen.font.SVGFont.main(SVGFont.java:672)
>         at org.apache.batik.apps.ttf2svg.Main.main(Main.java:23)
> null
>
> Thanks,
> Steffen Tiedemann Christensen
> steffen@infotouch.dk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org


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


Re: Problem converting fonts

Posted by Steffen Tiedemann Christensen <st...@infotouch.dk>.
Thanks David,

That really clarified the problem. When will Batik be able to handle Type 1
fonts?

Regards,
Steffen


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


RE: Problem converting fonts

Posted by David Schweinsberg <da...@steadystate.co.uk>.
Hi Guy

> I am very glad to hear the news of other font conversions,
> especially Type 1 conversions.

Thank you for your positive response.

> Will they all be apart of the Batik 1.1 release, or is this
> for more distant releases?

Not for Batik 1.1 I'm afraid.  I haven't submitted any new font code as yet,
but hopefully I'll be ableto within the next couple of weeks.

Regards,

David Schweinsberg


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


Re: Problem converting fonts

Posted by "Guy M. Spillman, Jr." <gm...@programmer.net>.
I am very glad to hear the news of other font conversions, especially Type 1
conversions.  Will they all be apart of the Batik 1.1 release, or is this for
more distant releases?

Guy M. Spillman, Jr.

David Schweinsberg wrote:

> This doesn't help you presently, but I am extending TTF2SVG to work with PS
> outlines.  Also to directly handle Type 1 and CFF fonts.  RSN!
>
> Regards,
>
> David Schweinsberg


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


RE: Problem converting fonts

Posted by David Schweinsberg <da...@steadystate.co.uk>.
> The real problem is: I need to use a PFM (or PFB, AFM or II) font
> in an SVG, which will be rasterized afterwards; How?

You'll need some way of converting the PS font to a TrueType outline, rather
than relying on the conversion that occurs on copying to the Windows font
folder.  AFAIK this just converts to a "TrueType Open" / "OpenType" font,
which is able to hold PS font outlines.

This doesn't help you presently, but I am extending TTF2SVG to work with PS
outlines.  Also to directly handle Type 1 and CFF fonts.  RSN!

Regards,

David Schweinsberg


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


Re: Problem converting fonts

Posted by Steffen Tiedemann Christensen <st...@infotouch.dk>.
> It would appear that this TTF doesn't have an OS/2 table.  Do you know if
> this is the case?
No, I don't know for certain, but as Guy pointed out, this particular font
has been converted from .pfm on Windows NT (simply by copying it into the
font dir). The real problem is: I need to use a PFM (or PFB, AFM or II) font
in an SVG, which will be rasterized afterwards; How?

thanks,
Steffen


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


RE: Problem converting fonts

Posted by David Schweinsberg <da...@steadystate.co.uk>.
Hi Steffen

> Can anyone explain the following problem (and the fix)?
>
> $ /usr/local/j2sdk1.3.1/bin/java -jar /svg/batik/batik-ttf2svg.jar
> /fonts/B014003T.TTF

[...]

>java.lang.NullPointerException
>        at
>org.apache.batik.svggen.font.SVGFont.writeFontAsSVGFragment(SVGFont.java:26
0
>)
>        at org.apache.batik.svggen.font.SVGFont.main(SVGFont.java:672)
>        at org.apache.batik.apps.ttf2svg.Main.main(Main.java:23)

It would appear that this TTF doesn't have an OS/2 table.  Do you know if
this is the case?

Regards,

David Schweinsberg


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