renderPM can't set font
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-reportlab (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Since the `gsfonts` dependency was removed in bug #1862641, some reportlab functionalities are failing.
It can be reproduced with a simple example. First, ensure that `gsfonts` package is not installed.
In python3:
```
from reportlab.
barcode = createBarcodeDr
barcode.
```
This leads to the following traceback:
```
Warn: Can't find .pfb for face 'Times-Roman'
Traceback (most recent call last):
File "/usr/lib/
gs.
ValueError: _renderPM.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
_renderPM.
TypeError: makeT1Font() argument 2 must be str, not None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return renderPM.
File "/usr/lib/
drawToFile(
File "/usr/lib/
c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=
File "/usr/lib/
draw(d, c, 0, 0, showBoundary=
File "/usr/lib/
R.draw(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
_setFont(
File "/usr/lib/
raise RenderPMError(
reportlab.
Originally <class 'TypeError'>: makeT1Font() argument 2 must be str, not None
```
After installing the `gsfonts` package, the traceback does not occurs and the code works as expected.
lsb release: Ubuntu 20.04.1 LTS
python3-