f



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

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


0
gino
7/9/2004 1:21:19 AM
comp.lang.java.gui 8286 articles. 0 followers. Post Follow

4 Replies
1325 Views

Similar Articles

[PageSpeed] 47

Try to get as many votes for
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4726365.
In a Javalobby thread it was stated that a Sun engineer said he doesn't
belive that missing subpixel hinting is a problem.

0
Stefan
7/9/2004 8:49:41 AM
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


0
Mike
7/11/2004 12:03:58 AM
"Mike Smith" <mikesmithv@yahoo.com> wrote in message
news:Ot%Hc.8853$E61.7387@newssvr25.news.prodigy.com...
> 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
>
>


0
Liz
7/11/2004 12:52:01 AM
----- Original Message ----- 
From: "Liz" <Liz@nospam.com>
>
> "Mike Smith" <mikesmithv@yahoo.com> 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


0
Mike
7/11/2004 1:57:10 AM
Reply: