Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5079135

glyphlayout should be able to handle an unset graphics enviroment situation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • client-libs
    • None
    • 2d
    • 5.0
    • b51
    • sparc
    • solaris_9

      Generates a glyphvector through font.layoutGlyphVector() without init the
      graphics enviroment will get java.lang.UnsatisfiedLinkError: initGVIDs

      The problem starts from b54 (I guess the problem was occured after InitGVIDs native method was added). Prior to b54, it is ok to call font.layoutGlyphVector() without init graphics env and no exception will throw.

      The work around is simplely to call
      GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

      A simple test program is attached.

            prr Philip Race
            jwangsunw Jane Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: