Hi guys, I apologize if you've seen this email before, but I can't tell if you have. I failed to subscribe to the "batik-dev" list earlier, so I would have missed any response you guys had to this. If someone *did* reply, would you mind resending the response to me?
Thanks very much, Christian ---------- Forwarded message ---------- From: Christian Convey <[email protected]> Date: Mon, Aug 15, 2011 at 4:14 PM Subject: Bug in automatic font selection? To: [email protected] This is a re-post of an unanswered question on the batik-users list. I've also got some more info now. The new information is as follows: I'm looking at the specific parameters on the call stack when this exception is generated. The method activation: FontManager.findOtherDeferredFont(String, int) line: 898 has the following noteworthy parameter values: fname="lohit_bn.ttf" fileName="/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf" There are two things here that seem like a bug to me: (A) I do have "lohit_bn.ttf" on my system, but it's got a different path than the one shown above. It's actually located at, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_bn.ttf" (B) I'm a US/english user. This sounds like it's defaulting to an Indic font. Is that really the right thing to do? Thanks very much, Christian Here's the original post from the other list: I'm using Batik 1.7 (built from website's sources), Ubuntu 11.04, and openjdk 6b22-1.10.2-0ubuntu1~11.04.1. I'm using the the "TestSVGGen" example code ( http://xmlgraphics.apache.org/batik/using/svg-generator.html ) When I just past that code into a .java file, and built and run it from the command line, it works great. But when I put that same class into my Eclipse project, I get the following stack dump. Anyone know what I might be doing wrong? TestSVGGen [Java Application] sisal.ifx.plot.intermediate_graphics.TestSVGGen at localhost:32788 Thread [main] (Suspended (exception NullPointerException)) TrueTypeFont.open() line: 290 TrueTypeFont.verify() line: 476 TrueTypeFont.<init>(String, Object, int, boolean) line: 179 FontManager.registerFontFile(String, String[], int, boolean, int) line: 999 FontManager.initialiseDeferredFont(String) line: 946 FontManager.findOtherDeferredFont(String, int) line: 898 FontManager.findDeferredFont(String, int) line: 915 FontManager.findFont2D(String, int, int) line: 1903 FontManager.findFont2D(String, int, int) line: 1864 Font.getFont2D() line: 477 Font.getFamily(Locale) line: 1166 Font.getFamily_NoClientCode() line: 1140 Font.getFamily() line: 1132 SVGFont.familyToSVG(Font) line: 412 SVGFont.toSVG(Font, FontRenderContext) line: 241 SVGFont.toSVG(GraphicContext) line: 221 SVGGraphicContextConverter.toSVG(GraphicContext) line: 101 DOMTreeManager.<init>(GraphicContext, SVGGeneratorContext, int) line: 145 SVGGraphics2D.setGeneratorContext(SVGGeneratorContext) line: 364 SVGGraphics2D.<init>(SVGGeneratorContext, boolean) line: 325 SVGGraphics2D.<init>(Document) line: 263 TestSVGGen.main(String[]) line: 33 Daemon Thread [Batik CleanerThread] (Running) /usr/lib/jvm/java-6-openjdk/bin/java (Aug 14, 2011 1:46:01 PM) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
