Thomas,

I compiled and ran your attached Test and results on my Mac laptop running Mac OS X 10.2.6 with JDK

java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)

were:


java -cp . Test
Exception in thread "main" java.lang.NullPointerException
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi csEnvironment.java:327)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi csEnvironment.java:359)
at Test.main(Test.java:13)

However, I ran the same test on another Mac that I have access to, also running Mac OS X 10.2.6 with JDK:


java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)

and the results were:


java -cp . Test
2003-07-21 02:33:49.020 java[542] Font GB18030Bitmap: in _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-21 02:33:49.049 java[542] Warning: Font LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
Font: #GungSeo
Font: #HeadLineA
Font: #PCMyungjo
Font: #PilGi
Font: .Aqua Kana
Font: .Keyboard
Font: American Typewriter
Font: Andale Mono
Font: Apple Chancery
Font: Apple LiGothic
Font: Apple LiSung
Font: AppleGothic
Font: AppleMyungjo
Font: Arial
Font: Arial Black
Font: Arial Narrow
Font: Arial Rounded MT Bold
Font: Baskerville
Font: Beijing
Font: BiauKai
Font: Big Caslon
Font: Brush Script MT
Font: Capitals
Font: Charcoal
Font: Chicago
Font: Cochin
Font: Comic Sans MS
Font: Copperplate
Font: Courier
Font: Courier New
Font: Default
Font: Dialog
Font: DialogInput
Font: Didot
Font: Fang Song
Font: Futura
Font: Gadget
Font: GB18030 Bitmap
Font: Geneva
Font: Georgia
Font: Gill Sans
Font: Hei
Font: Helvetica
Font: Helvetica Neue
Font: Herculanum
Font: Hiragino Kaku Gothic Pro
Font: Hiragino Kaku Gothic Std
Font: Hiragino Maru Gothic Pro
Font: Hiragino Mincho Pro
Font: Hoefler Text
Font: Impact
Font: Kai
Font: Lucida Bright
Font: Lucida Grande
Font: Lucida Sans
Font: Lucida Sans Typewriter
Font: Marker Felt
Font: Monaco
Font: Monospaced
Font: New York
Font: Optima
Font: Osaka
Font: Palatino
Font: Papyrus
Font: Sand
Font: SansSerif
Font: Seoul
Font: Serif
Font: Skia
Font: Song
Font: STFangsong
Font: STHeiti
Font: STKaiti
Font: STSong
Font: Symbol
Font: Taipei
Font: Techno
Font: Textile
Font: Times
Font: Times New Roman
Font: Trebuchet MS
Font: Verdana
Font: VT100
Font: Webdings
Font: Zapf Dingbats
Font: Zapfino

Also, on this other Mac that I have access to, I had not previously installed Batik 1.5 final release -- I did install Batik 15. beta 5 and was able to successfully run squiggle on that machine.


Whereas, on my laptop configured with OS X / JDK as aforementioned, I was able to originally install 1.5 beta 5 and run squiggle successfully. After having downloaded the final 1.5 release and having run it *unsuccessfully* on my laptop (with the problems I noted in Vancouver), I then tried to switch back to Batik-1.5beta5 this past weekend -- and I unable to successfully revert to beta 5 (I receive different errors than release 1.5). Does Batik, when attempting to run squiggle, create any other additional directories and/or write to additional files in the user's home directory (or elsewhere?) that I need to know about for cleaning purposes (so I can gracefully move back and forth between 1.5 release and 1.5 beta 5)? Is it possible that release 1.5 corrupted any files on my laptop and thus am now unable to switch back to beta 5?

Best regards,

-Brendan

On Monday, July 21, 2003, at 01:36 AM, Thomas DeWeese wrote:

Brendan Lane Larson wrote:
Thomas and Vincent,
Good to meet both of you at SVG Open in Vancouver last week. As I noted a few days ago at the conference, the 1.5 Batik release fails on Mac OS X 10.2.6 when I attempt to run Squiggle to view SVG documents (the previous version of 1.5 beta worked fine). The version of Apple's JDK that I have installed on my Mac is as >> follows:

This has all the appearence of a JDK issue. Can you tell me if the attached sample Java test file fails?

    You should be able to run it with:
    % javac -g Test.java
    % java -cp . Test


java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
When I run squiggle, as it is loading its various resources during start-up, I receive an error message in a panel that states, "SVG Error: null" with Show Details stating:
java.lang.Exception
at org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114 )
Per Thomas' suggestion after the Batik Panel discussion at SVG Open, I compiled the source of Batik release 1.5 in the xml-batik directory with the debug=on switch set in the build.properties document that I created, and then I ran './build.sh squiggle' with the following output (see below) which I hope if useful. Please let me know if I can be of further assistance with respect to Batik and Mac OS X 10.2.x.
Cheers,
-Brendan Lane Larson
./build.sh squiggle
Buildfile: build.xml

init-args:

init:

compile:
Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
debug on, optimize on, deprecation on
/Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ svgbrowser/Main.java:812: warning: encode(java.lang.String) in java.net.URLEncoder has been deprecated
lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).t oS tring()));
^
/Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ svgbrowser/Main.java:858: warning: decode(java.lang.String) in java.net.URLDecoder has been deprecated
lastVisited.addElement(URLDecoder.decode(st.nextToken()));
^
2 warnings


squiggle:
2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-20 13:51:02.440 java[4629] Warning: Font LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
2003-07-20 13:51:04.112 java[4629] Warning: Font LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
java.lang.ExceptionInInitializerError
at org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIFo rF ontMatching(StrokingTextPainter.java:439)
at org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Strokin gT extPainter.java:196)
at org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(Stroking Te xtPainter.java:1029)
at org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(Basi cT extPainter.java:81)
at org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBound s( AbstractGraphicsNode.java:841)
at org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(Composit eG raphicsNode.java:231)
at org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java: 10 07)
at org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtil it ies.java:612)
at org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilter El ementBridge.java:66)
at org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java: 66 1)
at org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode( Ab stractGraphicsNodeBridge.java:118)
at org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseE le mentBridge.java:317)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 18 6)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 18 4)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
at org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod e( SVGUseElementBridge.java:167)
at org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse El ementBridge.java:76)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 17 8)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 18 4)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
at org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod e( SVGUseElementBridge.java:167)
at org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse El ementBridge.java:76)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 17 8)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
at org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
Caused by: java.lang.NullPointerException
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap hi csEnvironment.java:327)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap hi csEnvironment.java:359)
at org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResol ve r.java:62)
... 31 more
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

/ *********************************************************************** *******
*
* Copyright 2003, Eastman Kodak Company, All rights reserved
*
*********************************************************************** ******/


import java.awt.*;

public class Test {
    public static void main(String [] args) {
        GraphicsEnvironment env;
        env = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String fontNames[] = env.getAvailableFontFamilyNames();

        int nFonts = fontNames != null ? fontNames.length : 0;
        for(int i=0; i<nFonts; i++)
            System.err.println("Font: " + fontNames[i]);

        Font f = new Font("SansSerif", 0, 12);
    }
};

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to