Michele Puccini wrote:
Phil,
so, correct me if I'm wrong, the TextLayout.draw() rasterizes every
single
glyph (and its TextAttributes) to separate images before drawing them
to the
Graphics ?
Yes. That's the way almost all font rendering systems work. The separate
images
are a 'glyph cache'
I can understand the complexity behind glyphs, fonts, graphics and
text, but
.. is there a specific reason why we need to align to the pixel grid ?
Maybe
we would get the same features of the Texlayout by rasterizing
outlines and
effects straight to the Graphics and getting sub-pixel precision.
Maybe not.
Now it's your turn ;)
There is no guarantee that scan conversion by the graphics rasterisation
process
would produce the same results. A simple example is that many TrueType
fonts - especially east asian ones - contain embedded bitmaps. Use outlines
and it will be illegible,
Also this way would be much slower. Go ahead and time drawString()
vs getOutline.fill() .for more than a couple of iterations.
So in summary the difference is expected and understandable.
-phil.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".