1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: Georges Khaznadar <georgesk@debian.org>
Date: Sun, 5 Oct 2025 20:50:36 +0200
Subject: C059-Roman-font-default
===================================================================
---
src/reportlab/graphics/utils.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/reportlab/graphics/utils.py b/src/reportlab/graphics/utils.py
index 8453b2a..04d55bc 100644
--- a/src/reportlab/graphics/utils.py
+++ b/src/reportlab/graphics/utils.py
@@ -85,6 +85,11 @@ def __makeTextPathsCode__(tp=None, _TP = ('freetype','_renderPM')):
path_or_stream = getattr(font.face,'pfbFileName',None)
if not path_or_stream:
path_or_stream = font.face.findT1File()
+ if not path_or_stream:
+ # the T1 file was not yet found!
+ # fall back to C059-Roman
+ font = getFont("C059-Roman")
+ path_or_stream = getattr(font.face,'pfbFileName',None)
face = freetype.Face(path_or_stream)
self.faces[fontName] = (face,font)
return self.faces[fontName]
|