> since the base direction of the entire text is left-to-right.

So you have broken the text at some character index boundary,
and find that without access to the complete text (ie without
context) TextLayout isn't doing what you want.

I think you need to either run Bidi yourself (java.text.Bidi)
on the whole string, or simpler, and better, use the API that
was designed for this case : java.awt.font.TextMeasurer, or
java.awt.font.LineBreakMeasurer. It will return a succession
of TextLayouts representing the whole paragraph.

-phil.

Brien Colwell wrote:
hi --

By "end of line" I did mean the right side. I'm seeing this behavior
with Arabic embedded in English. I would expect the Arabic to appear on
the left, though, since the base direction of the entire text is
left-to-right. The way I'm splitting isn't preserving that information,
so I'll look into setting the base direction as Phil suggested.

Thanks for the help!

brien


*/[EMAIL PROTECTED]/* wrote:

     > However,
     > if I render a string that has runs RL, the R run
     > is rendered at the end of the line.

    Isn't this behavior the correct one? Your first part is RTL, so it
    is rendered at the right-hand side of the line (if this is what you
    mean by the "end of the line"). Your second part is LTR so it is
    rendered after it, but "after" is really "to the left of it" since
    the sentence begins with the RTL part.

    What RTL language are you using?
    [Message sent by forum member 'kirillcool' (kirillcool)]

    http://forums.java.net/jive/thread.jspa?messageID=230983

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


------------------------------------------------------------------------
Luggage? GPS? Comic books?
Check out fitting gifts for grads
<http://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz>
at Yahoo! Search.
===========================================================================
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