On 2/14/07, Evgeniy Stepanov <[EMAIL PROTECTED]> wrote: > FT2Font.get_charmap() returns a mapping from glyph index to character code. > This looks like a very bad design decision to me, because several character > codes can correspond to one glyph. For example, in Times New Roman, both 0x32 > (space) and 0xA0 (nbsp) are mapped to glyph index 3. Of course, the first one > gets lost in get_charmap(). > > I think, get_charmap should be fixed to return mapping from character codes to > glyph indices. Alternatively, get_charmap() could be left as it is, and > get_rcharmap() added.
I agree with you. I've already posted something about this issue some time ago: http://sourceforge.net/mailarchive/message.php?msg_id=37418828 > I'm willing to implement either one. Which do you prefer ? I think we should prefer the first alternative: I've made a quick grep through matplotlib's code and I've observed that each time get_charmap is called, the returned dict is never used as is, but immediately reversed. -- Nicolas Grilly ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel