Skip to content

BiDi issue #1036

Description

@G-LimeJuice

Description

HarfBuzzTextShaper is breaking bidi because it splits text into font runs before shaping then calls GuessSegmentProperties() on partial fragments.
this causes incorrect RTL and LTR ordering for mixed text like arabic with english.
direction should be set explicitly per bidi run and shaping should happen on full directional runs before any font splitting
Here
Image
Image

and so I turned EnableBiDi to disabled and the result is Latin text became incorrectly reversed :

Image Image

XNA Client Version

2.13.1

Steps To Reproduce

1.added arabic translation with font
2.edit font.ini to enable "EnabledBidi"
3.open client and looks incorrect bidi
...

Expected Behaviour

Mixed RTL and LTR text should render correctly according to unicode BiDi rules with proper visual ordering and correct placement of punctuation
For example text like
hi (مرحبا)
should display in a natural readable order.

Actual Behaviour

the client renders incorrect BiDi layout for mixed RTL and LTR text
causing wrong ordering and misplaced punctuation when displaying strings such as hi ((مرحبا or )مرحبا )

Additional Context

here log

client.log

Checklist

  • The issue happens on the latest official version of XNA Client and wasn't fixed yet.
  • I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
  • I added a very descriptive title to this issue.
  • I used the GitHub search and read the issue list to find a similar issue and didn't find it.
  • I have attached as much information as possible (screenshots, gifs, videos, client logs, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions