xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Tošovský <j.tosov...@tiscali.cz>
Subject RE: Support for Adobe Pro opentype fonts
Date Fri, 17 Apr 2009 18:09:25 GMT
> > Is there any chance to test it on font as local file, not in the system?
> Font.createFont(int fontType, java.io.InputStream src); 
Really so easily? Ok. 

I've used the following:
File ag = new File("C:\\test\\AGaramondPro-Regular.otf");
try {
	font = Font.createFont(Font.TRUETYPE_FONT, ag);
} catch (Exception e) {

With Adobe font I am getting:
java.awt.FontFormatException: Unsupported sfnt
        at sun.font.TrueTypeFont.init(TrueTypeFont.java:414)
        at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:160)
        at sun.font.FontManager.createFont2D(FontManager.java:2234)

This is probably reason why the font is not listed via

After conversion into TTF everything works fine (even with original Batik
code) - also characters with weird codes are rendered properly...

So I have to convert all font variants into TTF...
... and to file a new feature request to Java developers :-)

One question remains. WHY I can see in the Batik renderer output in case of
OTF any characters with this font applied? I would suppose either nothing or
everything, nothing between...


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

View raw message