Thanks Phil,

I got the picture. It would be nice to have an option to avoid gridfitting
and drawing to the graphics using shapes instead of images. This would be
helpful in the case I underlined in the AttributedStringTest.java

Many thanks to David for his links. They've been really helpful.

Cheers,

Mik
============================================================================
ClassX Development Italy  Via Francesca, 368/I I-56030 S.M. a Monte (PI) <
Tel.(+39)-0587-705153  Fax.(+39)-0587-705153  WEB: http://www.classx.it  <
============================================================================


----- Original Message -----
From: "Phil Race" <[EMAIL PROTECTED]>
To: "Michele Puccini" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, November 17, 2006 3:54 PM
Subject: Re: [JAVA2D] AttributedString and Outline (the return of the glyph
invaders!)


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".

Reply via email to