DavBfr / dart_pdf

Pdf creation module for dart/flutter
https://pub.dev/packages/pdf
Apache License 2.0
1.42k stars 632 forks source link

myanmar unicode code not display correctly #1498

Open naywun opened 1 year ago

naywun commented 1 year ago

Myanmar Unicode cannot display in correct order especially on pre-vowel.

Screenshot 2023-10-02 152049

thitlwincoder commented 1 year ago

@naywun Try with this

var myTheme = pw.ThemeData.withFont(
    base: pw.Font.ttf(await rootBundle.load("assets/fonts/Zawgyi-One.ttf")), 
);

final pw.Document _pdf = pw.Document(theme: myTheme);

and Convert Myanmar text to Zawgyi font with rabbit_converter

 Rabbit.uni2zg('အမည်')