Good fonts in java 1.4?

R

Rene

The link below is a screendump of my editor JE. On the left, you see it
running under Java 1.4 with Java2D and anti-aliasing, on the right you see
MS Java with smooth fonts set in the effects menu.

http://www.rene-grothmann.de/images/Schriftarten.gif

I would like to use Java 1.4, of course. But, as you can see I cannot get
the same quality. Escpecially, the reversed colors are bad.

Is there anything, I can do about that?

Thanks for any hints.
 
N

nos

Rene said:
The link below is a screendump of my editor JE. On the left, you see it
running under Java 1.4 with Java2D and anti-aliasing, on the right you see
MS Java with smooth fonts set in the effects menu.

http://www.rene-grothmann.de/images/Schriftarten.gif

I would like to use Java 1.4, of course. But, as you can see I cannot get
the same quality. Escpecially, the reversed colors are bad.

Is there anything, I can do about that?

Thanks for any hints.
Are you saying that your choice of editor dictates your choice of java?
 
K

Karsten Lentzsch

Rene said:
The link below is a screendump of my editor JE. On the left, you see it
running under Java 1.4 with Java2D and anti-aliasing, on the right you see
MS Java with smooth fonts set in the effects menu.

http://www.rene-grothmann.de/images/Schriftarten.gif

I would like to use Java 1.4, of course. But, as you can see I cannot get
the same quality. Escpecially, the reversed colors are bad.

Is there anything, I can do about that?

If you want to use the Windows subpixel renderer,
either use a native access, use the AWT, or SWT.
Otherwise turn off anti-aliasing for small font
size on Windows.

The cross-platform T2K font rasterizer that is used
in the Java 1.4 and 1.5 Java2D implementations
uses a different anti-aliasing algorithm and
does not provide subpixel rendering.

Stefan M Aust has described this answer very well
in the German newsgroup. I'd say he's an expert
in UI implementation issues.

Best regards,
Karsten Lentzsch
 
R

Rene

Best regards,
Karsten Lentzsch

Thanks, I got the message: It is impossible to get the same quality of font
display in pure Java. While this is somewhat disappointing, most users don't
notice the difference. I have seen many Windows systems where this rendering
is not enabled.
 
R

Rene

Are you saying that your choice of editor dictates your choice of java?

No, I am the programmer of this editor. And of course, want to make it look
as good as possible. Moreover, I have other programs, and font display is
sort of important, don't you think?
 
K

Karsten Lentzsch

Rene said:
Thanks, I got the message: It is impossible to get the same quality of font
display in pure Java. [...]

That's not what I said. Actually there are
pure Java rasterizers that have demonstrated
subpixel rendering. But these are slow, don't
use hardware acceleration and are likely not
what you want to choose.

And with pure Java AWT you'll get the subpixel
rendering too - if the OS provides it.

Karsten
 
C

Chris Uppal

Rene said:
Thanks, I got the message: It is impossible to get the same quality of
font display in pure Java. While this is somewhat disappointing, most
users don't notice the difference. I have seen many Windows systems where
this rendering is not enabled.

Possible because the users don't *want* to look at poorly rendered,
eye-straining, blurry, anti-aliassed text.

It depends on your eyes, and on the monitor you use, but for me (at least) any
kind of anti-aliassing works Very Badly Indeed on an LCD monitor. Personally I
wouldn't consider using your editor for a second if it looked anything like
either of the two images you linked to.

-- chris
 
K

Karsten Lentzsch

Chris said:
Possible because the users don't *want* to look at poorly rendered,
eye-straining, blurry, anti-aliassed text.

Seems we agree that users may still want to look at
well rastered anti-aliased text ;)
It depends on your eyes, and on the monitor you use, but for me (at least) any
kind of anti-aliassing works Very Badly Indeed on an LCD monitor. Personally I
wouldn't consider using your editor for a second if it looked anything like
either of the two images you linked to.

Note that the display quality of the screenshots provided
by Rene may significantly lag behind what the native
rasterizer can achieve. The rasterizer must know the physical
structure of your LCD, otherwise subpixel-rendering may fail.

Let me add that even a pixel-based anti-aliasing often increases
the readability and legibility for larger fonts. Compare for example:
http://www.cs.umd.edu/~pugh/java/bugs/manual/project-dialog.png
http://www.jgoodies.com/freeware/bookfinder/images/bookfinder-0_9.png

Actually in the latter shot one can see the result
of poor anti-aliasing ("powered by").

Best regards,
Karsten
 
C

Chris Uppal

Karsten said:
Seems we agree that users may still want to look at
well rastered anti-aliased text ;)

<grin>

Mind you, I don't think I've ever seen any such...

Note that the display quality of the screenshots provided
by Rene may significantly lag behind what the native
rasterizer can achieve. The rasterizer must know the physical
structure of your LCD, otherwise subpixel-rendering may fail.

I agree, but experience (mine) suggests that even if the rasterisation had been
done specifically for *this* laptop, then I'd still find the results harder to
read -- always provided, of course, that the fonts themselves were properly
designed and hinted for that resolution.

Let me add that even a pixel-based anti-aliasing often increases
the readability and legibility for larger fonts. Compare for example:
http://www.cs.umd.edu/~pugh/java/bugs/manual/project-dialog.png
http://www.jgoodies.com/freeware/bookfinder/images/bookfinder-0_9.png

I think those are good examples. The text "Find Bugs", and "Project", in the
first example does look ugly, and I'll agree that the smaller text is bad too.
But I don't think that that's because of the absence of anti-aliasing -- it's
because they are bad fonts, poorly adapted for the specific resolution. In
comparison, the second shot is using anti-aliasing for the "AUTHOR: ARNO
SCHMIDT" and the window title-bar. Now I'll agree that it *looks* better, but
that's the point that I think too many programmers miss -- there is a
difference between "looking better" and "being more readable". The big text on
that page is being used for titles, essentially as graphics, not as body text.
Titles are only glanced at and it really doesn't matter too much if they are
such that prolonged study would cause eye-strain. For body-text, OTOH, the
*readability* matters hugely. You'll notice that the second example is *not*
using anti-aliasing for the real text (the small text in the list), and it
looks perfectly fine, and is perfectly readable -- all because its a well
designed font *at that resolution*.

I really think the OP is making a big mistake even considering anti-aliasing
for a text editor (a body-text application, if ever there was one). If the
fonts that come with Java are bad then the solution is to find and use a
quality typeface, not to attempt a programming bodge that makes the text "look"
better (as in a picture) but can and will cause eye strain and headaches
(depending on the users' eyes and monitors -- and it's not only people with
poor eyesight that suffer).

There simply isn't enough resolution on a current display for small typefaces
unless they have been specifically optimised. Algorithmic "fixes" are
misguided; they don't work because they just don't have enough room to work in
(and if they did have enough room, then there'd be much less need for them
anyway). Such fixes are natural for a programmer to think of, I know, but this
is one case where you can't program yourself out of trouble. You can't add
quality afterwards...

-- chris
 
K

Karsten Lentzsch

Chris Uppal wrote:

Chris, I'm concerned about readability and legability for
small fonts and to a lesser extent for larger fonts.
In the latter case, the appearance gots a larger weight.

But even for small fonts, and even if they come with
hand-hinted bitmaps, subpixel-anti-aliasing *can*
increase the readability. For example if the small
holes in glyphs like 'e', 'a' can be modified in a
way that is impossible with pixel-level bitmaps.

Anyway, that's an issue that one shall measure.
I'd say that one can discuss the problem's background,
not the effect on the end-users that shall read.
There simply isn't enough resolution on a current display for small typefaces
unless they have been specifically optimised. [...]

I wouldn't say so for the IBM LCDs with 204 dpi hardware resolution.

But again, it seems we agree on the theoretical background
and sure, we may disagree in the personal perception when
we feel that we can read better or worse.

Best regards,
Karsten
 
J

Jon A. Cruz

Chris said:
Possible because the users don't *want* to look at poorly rendered,
eye-straining, blurry, anti-aliassed text.

It depends on your eyes, and on the monitor you use, but for me (at least) any
kind of anti-aliassing works Very Badly Indeed on an LCD monitor. Personally I
wouldn't consider using your editor for a second if it looked anything like
either of the two images you linked to.

Then either you have a poor hookup to your monitor, or need some other
tweaking.

Sub-pixel font rendering looks beautiful under OS X, and is in effect by
default in Swing apps (as long as it's enabled for the OS in general).

:)

One issue is whether or not the connection to the LCD monitor is analog
or digital. Digital gives a much chrisper image.

Or...

Hit Steve Gibson's site and run through some of the test images he has.

http://grc.com/cleartype.htm
 
R

Rene

Sub-pixel font rendering looks beautiful under OS X, and is in effect by
default in Swing apps (as long as it's enabled for the OS in general).

???

Not in Windows XP. I definitely have it enabled in the OS, but Swing does
not use it. Neither have I ever noticed it in Swing applications under any
Java in Linux, but that may be another story.
 
R

Rene

It depends on your eyes, and on the monitor you use, but for me (at least)
any
kind of anti-aliassing works Very Badly Indeed on an LCD monitor. Personally I
wouldn't consider using your editor for a second if it looked anything like
either of the two images you linked to.

That's what I said. Many, if not most users don't care for it.

In any case, if you do not like the fonts in the screenshot on the right, we
have no base of further discussion. I did test that on several monitors, and
found I prefered the smoothing on each of them by a wide margin. I go so far
as to say that unsmoothed fonts hurt my eye. As an examle, I have a hard
time to find an acceptable font for my Linux console (KDE terminal window).
 
C

Chris Uppal

Karsten said:
Chris, I'm concerned about readability and legability for
small fonts and to a lesser extent for larger fonts.
In the latter case, the appearance gots a larger weight.

Which is reasonable, I agree.

There simply isn't enough resolution on a current display for small
typefaces unless they have been specifically optimised. [...]

I wouldn't say so for the IBM LCDs with 204 dpi hardware resolution.

I've never used anything between the 125dpi of my current laptop (lovely
screen, provided I turn sub-pixel aliasing off ;-), and the 300 dpi of old
laser printers. (Well I probably have, but I don't think I've used anything
with reasonably crisp pixels in that range.) I wouldn't be surprised to find
that 204 dpi is fine enough to allow much more liberal reliance on algorithmic
rendering. But I'd still doubt whether anti-alising was the right
technology -- unless the pixels really were too small to see, the "blurred"
edges would still leave the eye (or my eyes, anyway) searching for hard edges
to fix their focus and not finding any.

But again, it seems we agree on the theoretical background
and sure, we may disagree in the personal perception when
we feel that we can read better or worse.

Agreed.

-- chris
 
J

Jon A. Cruz

Rene said:
???

Not in Windows XP. I definitely have it enabled in the OS, but Swing does
not use it. Neither have I ever noticed it in Swing applications under any
Java in Linux, but that may be another story.

OS X is Apple's Macintosh operating system.

http://www.apple.com/macosx/

I was just pointing out that on the majority of my machines, Swing text
is antialiased.

Apple probably did most of the work integrating Swing & Java with their
OS, as opposed to Sun doing the work on Windows. You might check the 1.5
beta and if it's not in yet, then file bug/feature reports with Sun.
 
C

Chris Uppal

Rene said:
That's what I said. Many, if not most users don't care for it.

Sorry, I'd misunderstood you as meaning that most users don't care *about* it.

I did test that on several
monitors, and found I prefered the smoothing on each of them by a wide
margin. I go so far as to say that unsmoothed fonts hurt my eye. As an
examle, I have a hard time to find an acceptable font for my Linux
console (KDE terminal window).

Well, obviously you should use whatever suits your own eyes best.

Still, I'm not at all surprised that you can't find a decent font for a KDE
window -- at least judging from my Suse 9.0 installation, Linux doesn't come
with *any* decent fonts at all. I mostly connect to Linux via a cygwin X
server running on my Windows laptop (well, actually, I normally just connect
via ssh...) and found that the KDE desktop was pathetic using the fonts
supplied with SuSE or included in the cygwin X port. It is only by telling the
X server to use the Windows fonts that the KDE desktop is (for me) bearable at
all -- in fact I was moderately amazed at how much of that awkward, amatuerish,
clunky, look/feel it lost once it had been fed a decent set of fonts.

-- chris
 
C

Chris Uppal

Jon said:
Then either you have a poor hookup to your monitor, or need some other
tweaking.

Nah. All my machines are laptops (of various screen sizes and resolutions)
except for one desktop box with a digital connection to the LCD. Not one of
them is improved (for my eyes) by any form of anti-aliasing, sub-pixel or
otherwise.

But, of course, it does depend on the eyes that are doing the looking.

-- chris
 
J

Jon A. Cruz

Chris said:
But I'd still doubt whether anti-alising was the right
technology -- unless the pixels really were too small to see, the "blurred"
edges would still leave the eye (or my eyes, anyway) searching for hard edges
to fix their focus and not finding any.

That's the whole point of sub-pixel font rendering on LCD's.

It tripples horizontal resolution using the R, G, and B rectangles as
separate pixels. Tune it right and you get nice hard edges.

Go to Steve's page at
http://grc.com/ctwhat.htm

for comparisons like:
http://image.grc.com/cleartypephoto1.jpg
and
http://image.grc.com/cleartypephoto2.jpg
 
C

Chris Uppal

Jon said:
That's the whole point of sub-pixel font rendering on LCD's.

It tripples horizontal resolution using the R, G, and B rectangles as
separate pixels. Tune it right and you get nice hard edges.

Go to Steve's page at
http://grc.com/ctwhat.htm

I did, years ago. Also I've played with the sub-pixel stuff built into Adobe
Acrobat Reader. And now I'm using WinXP, manufacturer-installed on a
(Sony) laptop which had it turned on by default, and presumably properly
configured (though I wasn't too impressed with the way they set up the
gamma-adjustment, I have to admit).

For me, sub-pixel anti-aliasing just does not work -- and if I wanted blobby,
blurry, text then I'd smear my screen with Vaseline ;-)

-- chris
 
T

Tim Tyler

Chris Uppal said:
Jon said:
That's the whole point of sub-pixel font rendering on LCD's.

It tripples horizontal resolution using the R, G, and B rectangles [...]

Or would do - if you could address the pixels without colour fringing.

As it is you have to distribute the energy among the four nearest
neighbours - so the result is not as good as "tripling the horizontal
resolution" might suggest.

I did, years ago. Also I've played with the sub-pixel stuff built into Adobe
Acrobat Reader. And now I'm using WinXP, manufacturer-installed on a
(Sony) laptop which had it turned on by default, and presumably properly
configured [...]

For me, sub-pixel anti-aliasing just does not work -- and if I wanted blobby,
blurry, text then I'd smear my screen with Vaseline ;-)

It sounds as though you need to try the "ClearType" tuner:

http://www.microsoft.com/typography/cleartype/tuner/1.htm
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top