Open masoudd opened 3 years ago
Relevant prior issues: #90, #38
i have made a simple farsi/arabic package that solves this issue
Please add support for Right to Left text. Arabic letters cannot be displayed.
// main.go: package main
import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/widget" )
func main() { myApp := app.New() myWindow := myApp.NewWindow("Window") text := "سلام" myWindow.SetContent(widget.NewLabel(text))
myWindow.ShowAndRun()
}
Please add support for Right to Left text. Arabic letters cannot be displayed.
Those are two different issues - one relates to additional hinting (as is the title of the issue) and the other is glyphs missing in the standard font.
The second is resolved either by loading a font in your theme, setting FYNE_FONT or using the develop branch where it looks up system fonts.
Is your feature request related to a problem? Please describe:
Take this code:
Use a Persian font like Nazli and run it:
Which is just the default glyphs of the input Unicode characters shown left to right and is simply wrong. What it would look like if it is shown right to left after substituting correct glyphs for characters depending on surrounding characters and changing the spacing of each glyph correctly:
![s2](https://user-images.githubusercontent.com/828670/101053410-ff571700-359c-11eb-86e7-25666caf49d3.png)
$ FYNE_FONT=Nazli.ttf go run main.go
You'll get this:Is it possible to construct a solution with the existing API?
I don't think the API needs to change. The way text is rendered in the internal parts is the issue.
Describe the solution you'd like to see:
Using go bindings of a text rendering library like Pango