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

Support for Arabic and other RTL languages in TextView #196

Open
dimonovdd opened this issue May 23, 2021 · 5 comments
Open

Support for Arabic and other RTL languages in TextView #196

dimonovdd opened this issue May 23, 2021 · 5 comments
Labels
Status/1. Ready This issue has been confirmed and is ready to be worked on. Type/Enhancement

Comments

@dimonovdd
Copy link

dimonovdd commented May 23, 2021

Description

I use your plugin in a Xamarin.Froms project with Arabic language support. But unfortunately even if we add a font for Arabic the RTL of the text remains incorrect.

Description of the desired solution
I would very much like the TextView to support RTL

Difficulty:
Very Hard

Additional context
Currently, the primary rendering of glyphs is done through the Typography. For the subsequent rendering you use SkiaSharp. Maybe if the full rendering process went through SkiaSharp you could use SkiaSharp.HarfBuzz.

Using the Skia we can also get a system TypeFace for drawing each character:

var charTypeface = SKFontManager.Default.MatchCharacter(numberChar);
@dimonovdd dimonovdd added Status/0. New This issue is new and is awaiting confirmation from the maintainers. Type/Enhancement labels May 23, 2021
@Happypig375
Copy link
Collaborator

Hopefully MAUI Graphics can help in this area.

@Happypig375 Happypig375 added Status/1. Ready This issue has been confirmed and is ready to be worked on. and removed Status/0. New This issue is new and is awaiting confirmation from the maintainers. labels May 24, 2021
@dimonovdd
Copy link
Author

How exactly can it help with this issue? As I understand it the Microsoft.Maui.Graphics will use SkiaSharp.HarfBuzz for rendering text.

@Happypig375
Copy link
Collaborator

MAUI Graphics has no mention of HarfBuzz anywhere.

@dimonovdd
Copy link
Author

I think I need to see how Microsoft.Maui.Graphics works with text. We found a temporary solution for RTL:
https://github.com/fsufyan/BidiSharp
Now we need to make the text go from the right edge

@Happypig375
Copy link
Collaborator

For CSharpMath TextViews, there is a text alignment property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status/1. Ready This issue has been confirmed and is ready to be worked on. Type/Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants