Re: RenderPMError when using TTF in bitmaps

Dinu Gherman <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
Hi Robin,

thanks for digging out a font on the net! I've found Wikipedia’s claim that there is no canonical download site for this: https://en.wikipedia.org/wiki/Code2000 - I remember I found my version many years ago, maybe eight or so, hey, that’s what the timestamp says! But mine has a different hash and size (mind the renaming):

$ md5 fonts/Code2000.*
MD5 (fonts/Code2000.0.ttf) = 30d28c780c3a46858351c9323421f25a
MD5 (fonts/Code2000.1.ttf) = 052eaff1c80993c8f7dca4ff94bb83ca
$ ll fonts/Code2000.*
-rwxr-xr-x  1 dinu  staff  8377000 11 Jan 16:16 fonts/Code2000.0.ttf
-rw-r--r--@ 1 dinu  staff  3155104  3 Feb  2010 fonts/Code2000.1.ttf

Still, both versions give me the same error I’ve reported already, for my code as well as for yours. I’ll send you the TTF in a separate email. In my case I’m using various Asian alphabets (will send you a sample, too), but apparently that’s not the reason for the issue I’m observing.

Cheers,

Dinu


Robin Becker <[email protected]>:
> 
> 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
> _______________________________________________
> reportlab-users mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users

_______________________________________________
reportlab-users mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/reportlab-users
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.