Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Font Problem/Query

Options
  • 28-03-2001 1:30pm
    #1
    Registered Users Posts: 932 ✭✭✭


    sorry if you've allready seen this...

    ask the sun:

    http://java.sun.com/docs/books/tutorial/2d/textandfonts/fontselection.html

    as to adding new fonts - It looks like Java just looks on your system to see what fonts you have installed.


    ps check out the disclaimer on the bottom of the page "Note: Due to bug # 4155852, ..."
    lol smile.gif


Comments

  • Registered Users Posts: 2,660 ✭✭✭Baz_


    Any Java gurus out there??

    I had this class exercise which requested input from the user as to which font to display, however the only fonts which seem to display properly are arial, courier new and times new roman. If you try to use another font say impact or tahoma then arial is used (which makes me believe that arial is the default).

    However there is a protected class GraphicsEnvironment with an abstract method getAllFonts() which supposedly returns an array of all the fonts available to you, what I would like to know is how to call this method. If anyone knows or has any experience with this problem please reply as it's wrecking me bonce.

    Further to this is the fact that the documentation says that you need a proper query method or factory to call this method (whatever they are) again if you know what they are please help.

    One more thing if you know how to load a new or some newer fonts so as they are available to the application please also include that.

    ta
    Baz_

    p.s. In case it matters, it's applets that I'm creating.


Advertisement