Support for Arabic and other RTL languages in TextView
Opened this issue · 5 comments
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);
Hopefully MAUI Graphics can help in this area.
How exactly can it help with this issue? As I understand it the Microsoft.Maui.Graphics
will use SkiaSharp.HarfBuzz
for rendering text.
MAUI Graphics has no mention of HarfBuzz anywhere.
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
For CSharpMath TextViews, there is a text alignment property.