79592999

Date: 2025-04-25 17:05:21
Score: 1
Natty:
Report link

I am also working with a naturally unicode language and the easiest and sure fix as follows:

1-] Download a unicode supporting true type font. An example is OpenDyslexic-Regular.

Here is GitHub repository for it.

2-] You either work in that directory you downloaded .ttf while in Python, or give the complete path.

3-]

pdf = FPDF()
pdf.add_page()
pdf.add_font("OpenDyslexic-Regular", "", "./OpenDyslexic-Regular.ttf", uni=True)
pdf.set_font("OpenDyslexic-Regular", "",8)
pdf.multi_cell(0, 10, txt="çiöüşp alekrjgnnselrjgnaej")
pdf.output("##.pdf" )

4-] enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: FIRE Araştırma Eğitim Ltd. Şti