Package: python3-renderpm Version: 3.6.12-1 Severity: important X-Debbugs-Cc: christo...@monniez.eu
Dear Maintainer, Since the `gsfonts` package was replaced by `fonts-urw-base35`, `python3-renderpm` reportlab is not able to draw any of the 14 standard fonts anymore. The reportlab documentation states that those fonts only needs to be referenced by names. For example, this simple python3 script should work: ``` from reportlab.graphics.renderPM import PMCanvas c = PMCanvas(10,10) c.setFont('Times-Roman', 32) ``` But leads to this error on Debian Bookworm: ``` Warn: Can't find .pfb for face 'Times-Roman' Traceback (most recent call last): File "/tmp/canvas.py", line 4, in <module> c.setFont('Times-Roman', 32) File "/usr/lib/python3/dist-packages/reportlab/graphics/renderPM.py", line 405, in setFont _setFont(self._gs,fontName,fontSize) File "/usr/lib/python3/dist-packages/reportlab/graphics/utils.py", line 42, in setFont _errorDump(fontName,fontSize) File "/usr/lib/python3/dist-packages/reportlab/graphics/utils.py", line 29, in _errorDump rl_exec(code,dict(RenderPMError=RenderPMError)) File "<string>", line 1, in <module> reportlab.graphics.utils.RenderPMError: Error in setFont('Times-Roman',32) missing the T1 files? ``` Altough the `fonts-urw-base35` is properly installed. This applies to any of the 14 standard fonts: Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, ZapfDingbats The above script works on Bullseye when the `gsfonts` package is installed, it also works if the `reportlab==3.6.12` package is installed via `pip`. It seems that when the `gsfonts` are installed, the file `n021003l.pfb` is used for `Times-Roman`. On the other hand, without the `gsfonts, when using the upstream pip package, the file `reportlab/fonts/_er_____.pfb` is used. I saw that the `fonts` directory from upstream is completely removed in the Debian package. I think that it should work out of the box as it was when `gsfonts` were available and as stated in the upstream documentation. Either the `fonts` directory should not be removed from the package, or the package should include the `gsfonts` pfb files for the 14 standard fonts, or the package should be patched to work with the `fonts-urw-base35` provided files. -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-1-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages python3-renderpm depends on: ii fonts-urw-base35 20200910-6 ii libc6 2.36-8 ii libfreetype6 2.12.1+dfsg-4 ii python3 3.10.6-3+b1 python3-renderpm recommends no packages. python3-renderpm suggests no packages. -- no debconf information Thanks