[reportlab-users] TTF unicode support patch
Sakesun Roykiattisak
sakesun at boonthavorn.com
Sun Apr 3 23:19:15 EDT 2005
Basicly, I know nothing about TTF or PDF. Anyway, I want reportlab to
work with my language (Thai).
I've made a little change to PDFTextObjet._formatText in
reportlab/pdfgen/textobject.py:
def _formatText(self, text):
"Generates PDF text output operator(s)"
if self._dynamicFont:
# Add the following line
if isinstance(text, unicode): text = text.encode('utf-8')
...
Now my language is working. I just wonder if it would break anything.
And I also wonder why it was not implemented this way from the first
instance ?
More information about the reportlab-users
mailing list