Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsAligning TextLayout to the text baseline
https://www.eclipse.org/forums/index.php/mv/msg/708692/1309703/#msg_1309703
My problem is that I cannot find a way to orient the output of TextLayout.draw with a text baseline. For latin text (e.g., "abc") the TextLayout origin is the upper left corner of the block and those coordinates can be determined from the font metrics.
However, for Arabic text (for example, "العربية"), the height reported by TextLayout.getBounds() is larger than the height reported from the font metrics and the text, when rendered, appears visibly lower. The effect is most noticible when displaying a line containing mixed Arabic and Latin text, as the entire line will appear to shift down as soon as the first Arabic character appears.
I've seen this effect with both "Droid Arabic Naskh" and "Droid Sans Fallback" fonts. It is not present in all fonts, however.
Does anyone have experience with this issue or know how to handle this sort of layout issue? I thought I'd ask here before posting a bug report.]]>Jim Mayer2014-04-22T21:25:27-00:00Re: Aligning TextLayout to the text baseline
https://www.eclipse.org/forums/index.php/mv/msg/708692/1311392/#msg_1311392
Jim]]>Jim Mayer2014-04-23T19:40:03-00:00