PIL question. having exactly same font on multiple platforms

Irmen de Jong irmen.NOSPAM at xs4all.nl
Thu Aug 4 16:24:54 EDT 2011


On 4-8-2011 21:30, Irmen de Jong wrote:

> As far as I know, I did not see any difference in output on windows, linux and mac os x
> as long as the code used the same ttf file and PIL versions. (but I'll double check now
> and see if I remember this correctly).

To follow up on myself, I've just tested it with the same ttf file on windows, os x and
linux. (made an image in font size 40 with 'The quick brown fox....' as text line) The
resulting image files were byte-identical between os x and linux but the windows ones
were slightly different (just by a few bytes). The text in the image itself looked
identical though to the ones from the other systems (I couldn't see any difference by
looking at it) so I presume the difference is in the image compression or file header
metadata.

PIL's font rendering seems to produce identical results across platforms and if you see
a difference it must be caused by a difference in typeface file (or perhaps a different
PIL/freetype version on the platform).

Irmen



More information about the Python-list mailing list