[reportlab-users] Fonts with missing glyphs

Roberto Alsina ralsina at netmanagers.com.ar
Thu Sep 25 21:55:52 EDT 2008


On Thursday 25 September 2008 18:16:25 Andy Robinson wrote:

> 2008/9/25 Roberto Alsina <ralsina at netmanagers.com.ar>:

> > >From a rst2pdf user's request:

> >

> > Sometimes a glyph is not available in a specific font. For example,

> > unicode box drawing characters are not in Courier. Is there a way

> > reportlab could give a warning if it's being asked to draw a glyph in a

> > font that doesn't have it?

>

> We thought about this, and even looked at situations where we

> invisibly 'switch font' on the fly. I see 2 problems

>

> (1) string-drawing is key to perforrmance. Checking every drawString

> call might be slower, unless we increased our dependency

> on C. (It would be cheaper to check when the document is saved, or

> keep a set of characters seen in each font, so at least we could warn

> people).

>

> (2) worse, we don't actually know what's in YOUR copy of Courier.

> That's a feature of the version of Adobe Reader, or its competitors,

> which you use to view the PDF. I've seen files with, say, Serbo-Croat

> accents which are readable in a Bosnian version of Adobe Reader, but

> show as black blobs in a US English one. Same file, same (alleged)

> font. Now we have moved to unicode input, we have to assume all

> characters are valid input. (It would have been easier prior to 2.0

> when we often knew the character set of the font).


Ok, then, marked as "not a real bug".

--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it. --Brian W. Kernighan


More information about the reportlab-users mailing list