I am trying to render Telugu text into pdf using pyfpdf
.
The problem is with font rendition in fpdf
.
What might be the problem?
The code I used is :
#!/usr/bin/python
# -*- coding: utf8 -*-
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.add_font('lakkireddy', '', 'LakkiReddy.ttf', uni=True)
pdf.set_font('lakkireddy','', 16)
pdf.cell(40,10,u'హలో ప్రపంచమా!')
pdf.output('testfpdf.pdf','F')`
But the actual output is broken text :
What could be the issue, Is it the font, Is it encoding or Is it font rendering engine? Can I define which font rendering engine to use?