Re: RenderPMError when using TTF in bitmaps

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CAOBYczoFRm44f_rnNhSQMAZAUpyJVTatqscn+bPyTCgGPZSEyQ@mail.gmail.com>
Hi Dinu,

I used the code2000 from from here https://fonts2u.com/code2000.font. I
downloaded and unzipped and then ran this

################################################
from reportlab.graphics.shapes import String, Drawing
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfbase.pdfmetrics import registerFont
registerFont(TTFont('Code2000','Code2000/CODE2000.TTF'))

d=Drawing(200,20)
d.add(String(10,10,'Hello Cruel World!',fontName='Code2000',fontSize=12))
d.save(formats=['png'])
################################################

and it appears to work fine. I checksummed the font as

$ md5sum Code2000/CODE2000.TTF
052eaff1c80993c8f7dca4ff94bb83ca  Code2000/CODE2000.TTF



On 15 January 2018 at 08:36, Andy Robinson <[email protected]> wrote:

> On 15 January 2018 at 08:30, Robin Becker <[email protected]> wrote:
> > Hi Dinu, I believe this is just a generic response to a font loading
> error.
>
> We have had this response for about 16 years.  Perhaps we could check
> if we have the T1 files (or indeed if one was requested) before saying
> so, and just say "Font Loading Error" if we don't know.
>
> Idea: we could put a font-loading test widget on our web site which
> told people more and let them upload and print a glyph sheet...
>
> - Andy
> _______________________________________________
> reportlab-users mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>



-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.