> > 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);
System.out.print(font.canDisplay(63016));
} catch (Exception e) {
e.printStackTrace();
}
With Adobe font I am getting:
java.awt.FontFormatException: Unsupported sfnt
C:\test\AGaramondPro-Regular.otf
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
env.getAvailableFontFamilyNames();
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...
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]