Peter B. West wrote On 01/22/06 14:36,: > ---------------------- Information from the mail header > ----------------------- > Sender: Discussion list for Java 2D API <[EMAIL PROTECTED]> > Poster: "Peter B. West" <[EMAIL PROTECTED]> > Subject: layoutGlyphVector > ------------------------------------------------------------------------------- > > The API docs for java.awt.Font.layoutGlyphVector(...) have a slight bug. > The underlying text reads: > -quote- > <DD>Returns a new <code>GlyphVector</code> object, performing full > layout of the text if possible. Full layout is required for > complex text, such as Arabic or Hindi. Support for different > scripts depends on the font and implementation. > <p > Layout requires bidi analysis, as performed by > ><code>Bidi</code>, and should only be performed on text that > has a uniform direction. > -endquote- > > This is confusing. It says that layout requires bidi analysis, but then > appears to be saying that if, following this analysis, there is any > mixed bidi text, you can't use layoutGlyphVector. Is this correct? Does > this mean that I must perform the bidi analysis, then iterate through > the paragraph, calling layoutGlyphVector on each of the fragments in turn? > Yes, that's what it means. Layout is architected so that the layout engines only operate on unidirectional runs-- bidirectional analysis (and font/style mapping) is done at a higher level. This is exactly (among other things) what TextLayout does.
I agree, the documentation should be clarified. In the future it might be possible to make more of TextLayout's internal state visible so that clients could get the list of GlyphVectors that the TextLayout generated. Would that be useful to you? Doug > Peter > -- > Peter B. West <http://cv.pbw.id.au/> > Folio <http://defoe.sourceforge.net/folio/> > --- > [This E-mail has been scanned for viruses but it is your responsibility > to maintain up to date anti virus software on the device that you are > currently using to read this email. ] > > =========================================================================== > 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".
