[17:22:27] <AleXoundOS_> Hi. I'm converting .pcf font to .pil font. When I try to access any character which number is greater than 128 I get wrong characters.
[17:27:55] <wiredfool> That's interesting. I haven't don't much with the .pil fonts
[17:28:17] <wiredfool> what version are you running
[17:33:49] <wiredfool> let me see where to pull in pcf
[17:34:47] <AleXoundOS_> (I got .pcf after gunzip'ing /usr/share/font/misc/*.pcf.gz font)
[17:35:39] <wiredfool> you know, I'd just try throwing it through ImageFont.truetype. I don't think that it's actually checking for a font type, just dumping it off on freetypw
[18:14:38] <AleXoundOS_> I get wrong characters after trying to access anything higher than 128th char
[18:15:21] <wiredfool> ok, then I'm guessing it's picking out the metrics incorrectly
[18:15:55] <AleXoundOS_> for example instead of ё character, I get "T" character for the next 64
[18:16:20] <AleXoundOS_> so range 128-192 are all "T"
[18:17:03] <AleXoundOS_> and occasionally it prints some random second character after "T"
[18:22:15] <AleXoundOS_> wiredfool, here is the .pbm file: http://i.imgur.com/MX1HFma.png
[18:22:38] <AleXoundOS_> wiredfool, and this is what I get iterating chr(i) from 1 to 224 http://i.imgur.com/vs1UbVP.png
[18:30:55] <wiredfool> ok. I'm wondering if your font is just messed up. I've grabbed a copy of that font from ubuntu 12.04lts, (7x13-ISO8859-5.pcf), and I'm getting something reasonable
[18:54:39] <wiredfool> I've got enough here to make a reproducable test case
[18:55:34] <AleXoundOS_> heh, what options do I have to make it work? downgrading to Python 3.2 is the only option you think?
[18:57:17] <wiredfool> It'll work on 2.7 now. I don't think it's going to be that hard to patch
[18:57:23] <wiredfool> there may be some workaround
[18:57:45] <AleXoundOS_> oh, 2.7 is not an option at all))
[19:01:23] <wiredfool> wild guesses here -- I'm thinking that it's probably a unicode encoding issue, and that the problem isn't in the font creation but in the actual drawint.
[19:04:12] <wiredfool> I'm also out of time to work on it this morning.
[19:04:25] <aclark> wiredfool: man the Pyramid shop has been busy
[19:04:40] <wiredfool> I'll probably be a few days to track it down.
[19:05:49] <aclark> wiredfool: getting lots of github emails lately
[19:07:50] <AleXoundOS_> wiredfool, anyways, thank you very much, I've ideas on how to access the rest part at least, your test showed that there are usable characters somewhere between ~160-192
[19:09:30] <wiredfool> AleXoundOS_: I'm sure it's fixable It just needs going through each path and seeing where they diverge
[19:10:51] <wiredfool> aclark: so, that pypy segfault -- turns out it is a real use after free issue in our code
[19:13:30] <AleXoundOS_> wiredfool, there is some pattern in the "chaos" of characters, I tried with range(2230) http://rghost.net/51876417
[19:15:55] <wiredfool> wait, I'm getting it too, so that can't be it
[19:17:59] <wiredfool> There shouldn't be any characters in the font above 255, so somewhere there's a conversion that's taking a byte stream, interpreting it as unicode, and doing stupid things with it.