[reportlab-users] TTF Problem

Ian Millington reportlab-user at agon.com
Mon Feb 27 06:58:17 EST 2006


After doing a bit more digging I found some interesting information, which
may be old news to some, but I'll share it here.

In symbol fonts, the characters seemed to have the correct code, but with
0xf000 added to each value. 

>From what I can tell this is part of the TrueType Specification - it is the
'user' area, and is recommended for use in symbol or dingbat fonts
(wingding.ttf has this format too).

Most Windows applications (all that use standard GDI font-handling routines)
automatically subtract 0xf000 from the code point when dealing with one of
these fonts, so mapping the symbols onto the regular ASCII code values.
Because this is automatic, most vendor's tables of symbols are in turn given
with the 0xf000 already removed (including tools like character map which
give the subtracted code point). This is why my font worked fine in Word,
Illustrator, etc, but not in Reportlab.

Could I suggest this information is placed somewhere where folk may find it?
Is there a repository of wisdom somewhere?

I don't think Reportlab should join Microsoft in supporting the subtraction,
because it seems like changing around code-points automagically might be
asking for subtle bugs.

Ian




More information about the reportlab-users mailing list