[reportlab-users] TTF Problem
Robin Becker
robin at reportlab.com
Mon Feb 27 08:01:07 EST 2006
Ian Millington wrote:
> 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.
>
..... I noticed that the first 'space' character is at 0xf020 ie traditional
space +0xf000 and indeed most of the characters are in a continous range, but
the very last is someway off. I think it's a missing 'glyph'. I suspect that
many tools somehow ignore the upper bits and use only the lower byte which gives
characters starting space ! " # etc
--
Robin Becker
More information about the reportlab-users
mailing list