Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indented lines in wrapped RTL text #17175

Closed
dme-compunet opened this issue Oct 1, 2024 · 1 comment
Closed

Indented lines in wrapped RTL text #17175

dme-compunet opened this issue Oct 1, 2024 · 1 comment

Comments

@dme-compunet
Copy link
Contributor

dme-compunet commented Oct 1, 2024

Describe the bug

Several issues with processing right-to-left texts.
avalonia-rtl-bugs

As you can see, the picture describes two bugs:

  1. Wrapped RTL text adds an unnecessary empty line to the desired size of the control.
  2. The first line is slightly indented (possibly due to incorrect handling of the space after the word).

To Reproduce

XAML code:

<StackPanel Width="100"
            Spacing="6"
            Orientation="Vertical">

    <TextBox Name="Input"
             Text="aaa bbb ccc ddd eee"
             TextWrapping="Wrap"/>

    <Label Content="RightToLeft:"/>

        <TextBlock Text="{Binding #Input.Text}"
                   TextWrapping="Wrap"
                   Background="LightGray"
                   FlowDirection="RightToLeft"/>

    <Label Content="LeftToRight:"/>

        <TextBlock Text="{Binding #Input.Text}"
                   TextWrapping="Wrap"
                   Background="LightGray"
                   FlowDirection="LeftToRight"/>

</StackPanel>

Expected behavior

RTL text should be processed and laid out correctly.

Avalonia version

11.2.0-beta2

OS

Windows

Additional context

No response

@kerams
Copy link

kerams commented Oct 2, 2024

Pretty much a duplicate of #16165.

@dme-compunet dme-compunet changed the title Two Bugs in RTL Text Layout Lines indented in wrapped RTL text Oct 10, 2024
@dme-compunet dme-compunet changed the title Lines indented in wrapped RTL text Indented lines in wrapped RTL text #17175 Oct 10, 2024
@dme-compunet dme-compunet changed the title Indented lines in wrapped RTL text #17175 Indented lines in wrapped RTL text Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants