[geeks] Java: make it use the good fonts in X

Charles Shannon Hendrix shannon at widomaker.com
Mon Feb 19 16:35:53 CST 2007


On Mon, 19 Feb 2007 16:54:13 -0500
"Francois Dion" <francois.dion at gmail.com> wrote:

> On 2/19/07, Charles Shannon Hendrix <shannon at widomaker.com> wrote:
> > On Mon, 19 Feb 2007 03:03:46 -0500 (EST)
> > der Mouse <mouse at Rodents.Montreal.QC.CA> wrote:
> >
> > > > Does anyone know how to make Sun's Java use the good fonts when
> > > > running under X and Linux?
> > >
> > > > I would like Java apps to use sub-pixel fonts rather than the ugly
> > > > raster stuff.
> > >
> > > X font handling can't do anti-aliasing or sub-pixel rendering or
> > > anything else but simple bitmaps unless you depend on extensions.
> >
> > In case you haven't noticed just about *everything* is now a module or
> > extension.
> >
> > You can't use most fonts *AT ALL* without an extension these days.
> >
> > I don't see what that has to do with Java anyway, since I'm running it on
> > the same server with all my other applications.
> >
> > > Depending on what X server you want to run it against, there may be a
> > > way to do this - that I can't comment on.  But you definitely will need
> > > to look at extensions if you want sub-pixel font rendering under X.
> >
> > Ah, you misunderstood.
> >
> > I have sub-pixel font rendering working perfectly.
> >
> > The problem is that it isn't happening in Java.
> 
> Are you talking about Gnome's sub pixel smoothing? This only affects
> Gnome apps. For java apps, you have to call them with:

Well, I run KDE.  Sub-pixel font rendering is in X now, you just need library
code in X apps to use it.  

All KDE and Gnome apps can do this, and some vanilla X apps have been
modified to use XRender.  For example, Jim Getty's modified xterm to use
sub-pixel rendering.

> java -Dawt.useSystemAAFontSettings=lcd
> 
> I'm thinking that is what you want since I think you are running on a
> Samsung syncmaster 204b. If not, try:

Yes, that's what I have.

Can you put that in a configuration file and just have it happen
automatically?



-- 
shannon           | An Irishman is never drunk as long as he can hold onto 
                  | one blade of grass and not fall off the face of the earth.



More information about the geeks mailing list