Chris:

Clever technique.

You're right, different vendors have different implementations-- in
particular, Apple completely replaces the layout code with their own
engine.  I expect they replace rasterization and rendering, too.  So
unfortunatly there is no guarantee things like this will work.

Way, way back (1998?) when we (Taligent) were putting this together, we
prototyped extensible, object-oriented styles so that you could create
your own ways to graphically embellish spans of text.  It was cool.  At
the time, though, 1.2 was getting way late and our proposed style object
mechanism was replaced with a fixed set of tagged runs in the name of
simplicity.  As it was, TextLayout and GlyphVector almost got yanked out
of the API at the last minute-- Swing text was going to be the only way
to deal with styled or multiline text.  In the end it was going to be
more work to take it out than leave it in. The text layout API in
java.awt.font still bears scars from its difficult birth...

Have you filed RFE's for the features you had to implement yourself?
Please do.  There are other clients who needed a lot of rendering
control (SVG for example) and had to rebuild their own text system in
order to handle it.  It would be nice to have these in our system as
RFE's.  I know it's not really worthwhile for folks who need a product
done in a month to spend time filing RFE's, especially when it takes us
2 years to roll out a release that might not even implement them-- but
it does help if we have requests on record.

Thanks.

Doug




Chris Nokleberg wrote On 06/16/06 17:06,:
> ---------------------- Information from the mail header 
> -----------------------
> Sender:       Discussion list for Java 2D API <[EMAIL PROTECTED]>
> Poster:       Chris Nokleberg <[EMAIL PROTECTED]>
> Subject:      Re: Using GlyphVectors
> -------------------------------------------------------------------------------
>
> On Sat, Jun 17, 2006 at 12:46:17AM +0100, Peter B. West wrote:
>
>>This is the fly in the ointment. It seems to me that this limitation is
>>recognized as being serious in the Java2D "white paper".  The exit path
>>offered is GlyphVectors. They are adjustable, where TextLayouts are
>>immutable.
>
>
> Not sure how helpful this is, but you can "extract" the GlyphVectors
> from a TextLayout by drawing it onto a "proxy" Graphics2D which serves
> only to capture or modify the GlyphVectors as they come in. I've had to
> do this in order to customize the TextLayout rendering, for example to
> support shadowed and embossed text.
>
> You have to be a little careful because the implementation of TextLayout
> may vary platform to platform. For example the Apple impl uses
> drawString instead of drawGlyphVector.
>
> Chris
>
> ===========================================================================
> 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".

===========================================================================
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