Open mhamouda-cliko opened 1 year ago
you should choose the correct font for your language. This is my example for chinese.
pw.MultiPage( pageTheme: _buildTheme( pageFormat, await PdfGoogleFonts.notoSerifHKRegular(), await PdfGoogleFonts.notoSerifHKBold(), await PdfGoogleFonts.notoSerifHKLight(), ),
@sosocom
Arabic font does not support
pw.MultiPage(
pageTheme: _buildTheme(
format,
await PdfGoogleFonts.notoNaskhArabicRegular(),
await PdfGoogleFonts.notoNaskhArabicBold(),
await PdfGoogleFonts.notoNaskhArabicRegular(),
),
Text code
color: PdfColors.green,
width: double.infinity,
child: pw.Text(
AppLocalizations.of(c)
?.translate('lbl_successful_message')
.replaceAll(
'Closing_Date', payment.bid?.closingDate.value ?? '') ??
'',
textDirection: pw.TextDirection.ltr,
style: pw.TextStyle(
fontSize: 14,
color: PdfColors.black,
fontWeight: pw.FontWeight.bold,
font: font),
),
);`
actual output
Getting output that is incorrect
just use: textDirection: pw.TextDirection.rtl it works fine that way and Arabic renders the right way
Describe the bug
To Reproduce Code snippet to reproduce the behavior:
Expected behavior
Screenshots
Flutter Doctor
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context