dReportWriter wraps reportlab, and there are only a few built-in fonts available to use portably in your reports (Times, Helvetica, Courier plus corollaries that add bold and italic).
This is fine for a lot of needs, but:
- you may want to use a more modern-looking font
- these type1 fonts have hardly any unicode glyphs in them (can't print greek)
Lucky us, we *can* specify any TrueType? font, however:
- we need to know the location and filename of the .ttf file we want to use
- this location/filename will vary system to system/platform to platform
I've attached a few test files, that should show interested parties how to get extra glyphs printing in their reports. I'm not sure why the Bitstream Vera font didn't print the greek glyphs, since I used that very font in my editor and it showed the glyphs fine. But, I'm glad the DejaVu? font did work fine.
Eventually, I want to make it so that all you need to do is specify a FontName? in the rfxml, and the reportwriter will go out, look for, and either use the specified font or find a reasonable substitute. For now, you must explicitly register the fonts you will be using.
I hope this helps!
Attachments
- test_ttf.py (0.9 kB) -
Script to generate the TrueType? test pdf
, added by paul on 04/30/09 14:45:31. - test_ttf.rfxml (0.8 kB) -
rfxml for the test
, added by paul on 04/30/09 14:45:57. - test_ttf.pdf (45.0 kB) -
The PDF output on my Linux system
, added by paul on 04/30/09 14:46:33.
