ClearType: Does Java AWT use its own font or use the OS's font in displaying text field?

Discussion in 'Java' started by gino, Jul 9, 2004.

  1. gino

    gino Guest

    Hi folks,

    I need to display some ClearType text in a static text field of a GUI window
    using Java AWT. I heard that Java 2D itself currently does not support
    ClearType sub-pixel technology. I am wondering if AWT can render font using
    OS's global font setting, for instance, on Windows XP, the ClearType font
    can be enabled globally, on Linux, it also has sub-pixel rendering
    technology can can be enabled OS wide.

    I am wondering if the Java AWT uses OS's font by default?
    Furthermore, what shall I do if I want to capture the RGB pixel values of
    the displayed text and save to harddisk?

    Thanks a lot,

    -Gino
    gino, Jul 9, 2004
    #1
    1. Advertising

  2. gino

    Mike Smith Guest

    You get ClearType by default if you stick to using Label(). It is a major
    hack but see this page for how to do it. If you click the Run Demo button
    the bottom paragraph was created entire with Label(). The source is
    available on the web page - again, a major hack!

    http://www.smithvalley.com/test/aademo.htm

    Let me reinterate what theStepan said. Go to the Sun page and put in your
    vote so we do not need to do these kinds of hacks just to get decent text
    rendering.

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4726365.

    Mike
    Mike Smith, Jul 11, 2004
    #2
    1. Advertising

  3. gino

    Liz Guest

    "Mike Smith" <> wrote in message
    news:Ot%Hc.8853$...
    > You get ClearType by default if you stick to using Label().


    How can that be? When I set up my laptop for cleartype there were several
    screens that were displayed for me to choose from. And how is it done if
    you have, for example, linux?


    > It is a major
    > hack but see this page for how to do it. If you click the Run Demo button
    > the bottom paragraph was created entire with Label(). The source is
    > available on the web page - again, a major hack!
    >
    > http://www.smithvalley.com/test/aademo.htm
    >
    > Let me reinterate what theStepan said. Go to the Sun page and put in your
    > vote so we do not need to do these kinds of hacks just to get decent text
    > rendering.
    >
    > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4726365.
    >
    > Mike
    >
    >
    Liz, Jul 11, 2004
    #3
  4. gino

    Mike Smith Guest

    ----- Original Message -----
    From: "Liz" <>
    >
    > "Mike Smith" <> wrote in message
    > > You get ClearType by default if you stick to using Label().

    >
    > How can that be? When I set up my laptop for cleartype there were several
    > screens that were displayed for me to choose from. And how is it done if
    > you have, for example, linux?
    >


    Label() on Windows always calls through to whatever the native
    rendering is set to, this would be ClearType if you have it enabled in
    the Display control panel. This is true for the old Microsoft VM and
    the VM's by Sun and IBM since the beginning of time.

    I am not familiar with what the various Linux VM's do. In fact, I'm
    not sure how ClearType works on Linux at all since it is patented by
    Microsoft, but I know there are ways to make it work.

    Mike
    Mike Smith, Jul 11, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    2
    Views:
    5,945
    Robert Mark Bram
    Dec 11, 2003
  2. Roedy Green

    AWT font != Swing Font

    Roedy Green, Aug 8, 2005, in forum: Java
    Replies:
    0
    Views:
    467
    Roedy Green
    Aug 8, 2005
  3. Saverio M.
    Replies:
    0
    Views:
    501
    Saverio M.
    Jul 3, 2006
  4. thunk
    Replies:
    1
    Views:
    292
    thunk
    Mar 30, 2010
  5. thunk
    Replies:
    0
    Views:
    457
    thunk
    Apr 1, 2010
Loading...

Share This Page