Open gspencergoog opened 6 years ago
If softWrap
is false, then RenderParagraph._layoutText
will ask the engine to lay out the text with no width constraint.
RenderParagraph.paint
will then paint the resulting TextPainter
at the widget's left edge, resulting in the rightmost text being clipped.
One option would be to have RenderParagraph.paint
apply an offset during painting if the textDirection
is RTL. The offset would be based on the difference between size.width
and textSize.width
seen in RenderParagraph.performLayout
.
@Hixie
I think flutter doesn't care about rtl at all it's the third open issue i faced this month which is related to rtl
@cactoos13 Sorry it's taking so long to fix. We care, it's just that the people on the team who would fix it are dealing with some even more critical stuff right now.
Issue replicable on latest stable (1.20.3)
Any updates regarding this? Thanks!
Any Updates?
Reproducible on stable 3.3 and master 3.7, the Text remains clipped at the beginning(right-most end) in the RTL text.
cc: @jason-simmons
Reproducible on Channel stable, 3.10.3, ((
When a single line of text (defined like this):
Reaches the end of its allowed size (e.g. it's placed inside a box that is constrained to a width smaller than the text box), it will clip as expected, but on RTL it will clip off the beginning of the string instead of the end.
I tried tracking this down, and got lost when it jumped to the platform side, but I know that it shows the same behavior on Blink and libtxt. I'm assuming it is somewhere in the ParagraphBuilder, or in Paragraph.layout. Looking at the ui.ParagraphStyle and the TextPainter, I couldn't see anything amiss.
For instance, the string above is clipped like this:
When the string should start (on the left) with "תווית", and the long string should be clipped on the right.
LTR strings clip properly, so it's clearly something to do with something not handling/knowing about the text direction.