[Image-SIG] bug report: font sometimes not obeying kerning rules

Shula Amokshim shula.amokshim at gmx.com
Tue Jul 7 01:04:12 CEST 2009

Writing Latin text on an image using PIL is easy.

However, when I try to write Hebrew punctuation marks (called "nikud" or 
?????), the characters does not overlap (as it should).

On supporting environment, these two words take up the same space/width 
(the below example depend on your system, hence the image):

????? ???

However when drawing the text with PIL i'd get

? ? ? ? ?

Since the library probably doesn't obey kerning(?) rules,the error 
(latter example) occurs in all the ttf fonts I have installed (200+) 
beside DejaVuSans.ttf and Lucida*.ttf, on which it works OK.

See example as an image (url: http://tinypic.com/r/jglhc5/5) 
See differences in rendering among various fonts 

I guess this question is relevant also to Arabic and other similar 
languages with overlapping characters.

there's also a "bug" (or an unimplemented feature) not dealing with 
bidirectional (bidi-, RTL) fonts. Meaning, Hebrew text on the image is 
printed backwards. But that's another issue.

Here's my original discusstion on StackOverflow:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090707/df426432/attachment.htm>

More information about the Image-SIG mailing list