Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > ClearType: Does Java AWT use its own font or use the OS's font in displaying text field?

Reply
Thread Tools

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

 
 
gino
Guest
Posts: n/a
 
      07-09-2004
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


 
Reply With Quote
 
 
 
 
Mike Smith
Guest
Posts: n/a
 
      07-11-2004
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_id=4726365.

Mike


 
Reply With Quote
 
 
 
 
Liz
Guest
Posts: n/a
 
      07-11-2004

"Mike Smith" <(E-Mail Removed)> wrote in message
news:Ot%Hc.8853$(E-Mail Removed) m...
> 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_id=4726365.
>
> Mike
>
>



 
Reply With Quote
 
Mike Smith
Guest
Posts: n/a
 
      07-11-2004
----- Original Message -----
From: "Liz" <(E-Mail Removed)>
>
> "Mike Smith" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
I have built my own (simple) thread manager [TM], but just found java 5 has its own. Saverio M. Java 0 07-03-2006 08:52 AM
AWT font != Swing Font Roedy Green Java 0 08-08-2005 10:15 PM
JMF install on Linux: Cannot load AWT toolkit: gnu.java.awt.peer.gtk. Robert Mark Bram Java 2 12-11-2003 06:57 AM
Is the java.awt.Font class thread-safe? Frank LaRosa Java 1 12-09-2003 09:15 AM



Advertisments