-
Notifications
You must be signed in to change notification settings - Fork 330
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
Add attributes and properties for language and direction #563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, those screenshots in particular look excellent! Nice work.
I'm happy to see this in the library, most of these are minor and stylistic comments.
There is one performance consideration that I believe is quite important to avoid any degradation. It would be nice if you could run the Benchmarks
before and after the changes in this PR, to see if we have any differences.
Thanks for the feedback! I'll apply the suggestions and push a new commit sometime soon. |
Alright, I've applied your suggestions in another commit. I've run the benchmarks, and it looks like there isn't much of a difference. I've attached the outputs to this comment if you would like to look at them: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a couple of minor comments, then this is all good to merge in my view.
Thanks for running benchmarks too, looks good, if there are any changes then they are below the noise level.
Done! I went with |
Perfect, thanks a lot for the contribution! Looking forward to the follow-up sample :) |
Awesome! There's a few more tweaks I have to make to it, but it should be done within the next few days. |
This pull request adds more localisation support to RmlUi, based on the discussion in #553.
To summarise, it adds the following:
language
anddirection
) that directly cannot be set with RCSS.lang
: represents the language of the element's text and sets thelanguage
property.dir
: represents the text-flow direction of the element's text and sets thedirection
property.I have created a new sample for text-shaping to show these properties in action, but I will save that for another pull request (after this one is done). Below are some images of this sample.
Font rendering without text shaping.

(English–Arabic–Hindi)
Font rendering with text shaping.

(English–Arabic–Hindi)