Results 1 to 2 of 2
  1. #1
    amatra is offline Member
    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    Default Problems using a Light weight font with java.awt

    On my Mac, GraphicsEnvironment.getLocalGraphicsEnvironment(). getAllFonts() returns for the Helvetica font family :

    Font[family=Helvetica,name=Helvetica,style=plain,size=1]
    Font[family=Helvetica,name=Helvetica-Bold,style=plain,size=1]
    Font[family=Helvetica,name=Helvetica-BoldOblique,style=plain,size=1]
    Font[family=Helvetica,name=Helvetica-Light,style=plain,size=1]
    Font[family=Helvetica,name=Helvetica-LightOblique,style=plain,size=1]
    Font[family=Helvetica,name=Helvetica-Oblique,style=plain,size=1]

    It thus contains a Light and a LightOblique font (with weight set to 1.0f).

    However, when drawing with Java 2D, the Helvetica-Light output is obviously that of the regular Helvetica font.
    Deriving a new font from Font("Helvetica-Light") with weight 0.75 (or even less) does not change that behavior.

    What do I have to do to make Java use the Helvetica-Light font correctly?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,240
    Rep Power
    19

    Default Re: Problems using a Light weight font with java.awt

    Moved from Advanced Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 11-30-2011, 02:42 PM
  2. Replies: 0
    Last Post: 08-18-2010, 10:31 AM
  3. Additional Weight
    By laserjim in forum Lucene
    Replies: 0
    Last Post: 12-13-2009, 01:22 AM
  4. Replies: 5
    Last Post: 04-25-2009, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •