You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to convert unicode text into image, but the rendering in unicode is not correct. Here is an example, I want to convert this text "ស្នាក់" ( real sequence of characters : ស + ្ + ន + ក + ់). I expected to get "ស្នាក់" in the image, but I got the real sequence instead ("ស្នាក់"). Any ideas on this issue ?
Can you write a python based test case? I may have a chance at tracing it down that way. Especially if you can confirm that the font renders correctly in other applications on the same platform (e.g. libre office).
Ideally, having a correct/incorrect bitmap, the correct unicode string going in, and if you can tell what it is, what is actually being rendered.
I must admit, I don't understand Khmer, nor to I totally understand how it's combining glyphs.
Actually, the problem is subscript form in Khmer. If you notice on the plus sign on the bottom ('+'), this is used to tell the rendering that the next character must be transformed into subscript (and eventually should appear on the bottom of the baseline). then, the next vowel should be attached to the previous character (before the subscript character). In other word processors on my PC, this rendering works fine as expected. Just with python Image draw module, the subscript form was not transformed, and the next character is always there.
To be more precise, I tested with python 2.7.6, latest pillow version running on both ubuntu (12.04) & windows 7.
Activity
aclark4life commentedon Apr 7, 2014
My guess is that there are many unicode issues
[-]Unicode rendering in ImageDraw module[/-][+]Unicode rendering error in ImageDraw module[/+]wiredfool commentedon Apr 8, 2014
Can you write a python based test case? I may have a chance at tracing it down that way. Especially if you can confirm that the font renders correctly in other applications on the same platform (e.g. libre office).
Ideally, having a correct/incorrect bitmap, the correct unicode string going in, and if you can tell what it is, what is actually being rendered.
I must admit, I don't understand Khmer, nor to I totally understand how it's combining glyphs.
ensv commentedon Apr 8, 2014
HI wiredfool,
This is the simple program I used to convert khmer text into image : http://pastebin.com/44fqWTY4. This font was tested on both Ubuntu and windows and was confirmed to be correctly rendered. I also attach an image for you for the good rendering.
.
Actually, the problem is subscript form in Khmer. If you notice on the plus sign on the bottom ('+'), this is used to tell the rendering that the next character must be transformed into subscript (and eventually should appear on the bottom of the baseline). then, the next vowel should be attached to the previous character (before the subscript character). In other word processors on my PC, this rendering works fine as expected. Just with python Image draw module, the subscript form was not transformed, and the next character is always there.
To be more precise, I tested with python 2.7.6, latest pillow version running on both ubuntu (12.04) & windows 7.
radarhere commentedon Mar 31, 2019
The combining of glyphs is handled by raqm in Pillow 4.2.0. However, there is a clipping issue after that, discussed in #3235.