You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Bill van Melle <bi...@gmail.com> on 2011/07/26 23:36:17 UTC

Fonts don't scale well

One of the things I couldn't help noticing while working on ScalePane is
that text does not scale well.  The characters themselves are rendered
perfectly well at the new size, but the inter-character spacing is all
wonky.  It varies from font to font.  It's not terribly noticeable with
Pivot's default font (Verdana), and Lucida Sans is not bad.  But I can't use
either of those fonts, as they don't support all of Unicode (in particular,
Asian fonts).  So my app uses the Java generic SansSerif, and it's quite
noticeable there.

In contrast, as you can see from the ViewBox demo screencap I did the other
day, WPF has no problems scaling fonts gracefully.

So is there some bug in Pivot/Java's font rendering engine?

Re: Fonts don't scale well

Posted by Greg Brown <gk...@verizon.net>.
> So is there some bug in Pivot/Java's font rendering engine?

Yeah, Java2D has a pretty bad reputation when it comes to font rendering. It has gotten a lot better in recent years, but there are still a few warts.



Re: Fonts don't scale well

Posted by Noel Grandin <no...@gmail.com>.
Java has it's own internal rendering system for fonts, and it still has some rough edges.
It's been getting better in 1.6, but there are still glitches.

Bill van Melle wrote:
> One of the things I couldn't help noticing while working on ScalePane is that text does not scale well.  The
> characters themselves are rendered perfectly well at the new size, but the inter-character spacing is all wonky.  It
> varies from font to font.  It's not terribly noticeable with Pivot's default font (Verdana), and Lucida Sans is not
> bad.  But I can't use either of those fonts, as they don't support all of Unicode (in particular, Asian fonts).  So my
> app uses the Java generic SansSerif, and it's quite noticeable there.  
>
> In contrast, as you can see from the ViewBox demo screencap I did the other day, WPF has no problems scaling fonts
> gracefully.
>
> So is there some bug in Pivot/Java's font rendering engine?
>
>