I am using
pdfmetrics.registerFont(TTFont('Arial', 'Arial.ttf'))
pdfmetrics.registerFont(TTFont('Arial-Bold', 'Arial-Bold.ttf'))
I have converted "image_fonts.qrc" into image_fonts_rc.py file
. It has one image named as "image.png" and "Arial-Bold.ttf"
My question is How to use image and fonts into reportlab PDF in python from qrc.py file.
image_fonts.qrc
<RCC>
<qresource prefix="image_fonts">
<file>Arial-Bold.TTF</file>
<file>logo.png</file>
<file>Arial.TTF</file>
</qresource>
</RCC>
A possible solution is to read the font using QFile and save it in io.BytesIO can already be read by TTFont reportlab: