A Go Lang package for dealing with Persian text shaping.
You can use this package to print shaped persian/arabic texts on images and pdf files.
Note: Inspired by goarabic but more simple and clear for persian/arabic languages and supports bidi text reordering 😍
go get github.com/mehran-prs/gopersian
package main
import (
"fmt"
"github.com/mehran-prs/gopersian"
)
func main() {
fmt.Println("سلام")
fmt.Println(gopersian.Shape("سلام"))
fmt.Println(gopersian.Reorder(gopersian.Shape("سلام")))
fmt.Println(gopersian.Bidi("سلام خوبی؟")) // shape and reorder.
}
You can see docs on gopkgdoc.
Contributions are greatly appreciated. Please fork this repository, make your changes, and open a pull request.
MIT License.