UTF-8 font style for ReportLab

时间:2017-08-05 11:12:27

标签: python pdf encoding character-encoding reportlab

I'm using ReportLab to create invoices. Since my customers can have various characters in their names (german, polish, russian letters), I want them displayed correctly in my PDFs.

I know the key is to have a proper font style. Which font can handle all UTF-8 characters with no problems?

If there is no such font, how can I solve this?

1 个答案:

答案 0 :(得分:0)

I think you need to lower your sights a little. All UTF-8 characters is a really tall order. Do you really need Chinese, Japanese, Telugu, Hebrew, Arabic and emojis?

You have listed German, Polish and Russian. So you need a good coverage of Latin characters, plus Cyrillic.

On Windows, both Arial and Times New Roman will give you that. If you really do need Telugu and other East Asian writing systems then Arial Unicode MS has probably as much coverage as you are likely to want.