Peter,
I've used AttributedString to represent a sequence of text with various
attributes at different segments. Then, you can use the
LineBreakMeasurer(and passing the AttributedCharacterIterator, and
FontRenderContext). I found that the LBM didn't work well for blank
lines (and paragraph breaks), so I ended up handling those cases specially.
Once I had the lines broken up, I could iterate through and render them,
creating a glyph vector for each as I go.

David

Thus Spoke Peter B. West:

I have been using Font.layoutGlyphVector to obtain the dimensions of
laid-out text. This includes multiple concatenated runs of text, with
possible different Fonts, in a paragraph.  The text also includes
markers for optional hyphenation positions. After being dimensioned the
paragraph is subjected to line-breaking.

I need to be able to slice the vectors at the line-break positions. One
of the possible output formats for the text is GlyphVectors for display.
Is there any way to extract new GlyphVectors by slicing an splicing from
an existing set of vectors, or do I have to perfrom the GlyphVector
layout again for each line?

For example, I may have a paragraph comprised of three sub-vectors
created with different Fonts. This is to be sliced into seven lines.
Some of the lines will contain sections from more than one of the
original GlyphVectors.

Thanks
Peter

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