I'm trying to render some khmer text that has ligatures. Here's the command I'm using:
convert -font KhmerOS -pointsize 72 label:យោ khmer.gif
but this is the result I'm getting: http://esperanto.org.ar/khmer/khmer.gif . So it seems like ImageMagick is not properly joining those characters.
While searching some posts here I found this: viewtopic.php?f=3&t=14467&p=51019&hilit=ligature . It seems like its the same kind of problem, but I don't think it's a FreeType problem since they say the ligature processing is done before using freetype: a higher level program determines the ligatures and then just asks the glyphs to FreeType.
I'm using Ubuntu 10.04. Version of ImageMagick is:
Version: ImageMagick 6.5.7-8 2009-11-26 Q16 http://www.imagemagick.org
To use the khmer fonts the package is ttf-khmeros
If something needs to be changed in ImageMagick for this to work I can try to help.
Thanks!
Ary
Khmer rendering ligatures problem
Re: Khmer rendering ligatures problem
ImageMagick does not deal with ligatures and just calls FreeType directly. ImageMagick is open-source. If you want to tackle this problem, post your patches here under the ImageMagick license and we will get them into a future release of ImageMagick.a higher level program determines the ligatures and then just asks the glyphs to FreeType.
Re: Khmer rendering ligatures problem
Thank you for the quick reply!
So I'm not understanding whether ImageMagick does not deal with ligatures but should, or FreeType should deal with ligatures instead.
If ImageMagick should lead with ligatures but it doesn't, I can take a look at the code and try to make it work. If that's not the case, what should I do? Modify FreeType? Is there any other layer that's the one that should be dealing with ligatures?
So I'm not understanding whether ImageMagick does not deal with ligatures but should, or FreeType should deal with ligatures instead.
If ImageMagick should lead with ligatures but it doesn't, I can take a look at the code and try to make it work. If that's not the case, what should I do? Modify FreeType? Is there any other layer that's the one that should be dealing with ligatures?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Khmer rendering ligatures problem
You should be able to modify the unicode of the text string being passed to IM to handle the ligatures.
That is what is meant by the higher level programming.
That is what is meant by the higher level programming.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Khmer rendering ligatures problem
Hi anthony,
I don't think that's possible in Khmer. It's only two characters that show up as three glyphs and it's impossible to change the order of them such that the ligatures would display correctly because two of them need to surround the other glyph. For that unicode text gedit can display it perfectly while freetype and imagemagick can't, so the problem is in the rendering.
I don't think that's possible in Khmer. It's only two characters that show up as three glyphs and it's impossible to change the order of them such that the ligatures would display correctly because two of them need to surround the other glyph. For that unicode text gedit can display it perfectly while freetype and imagemagick can't, so the problem is in the rendering.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Khmer rendering ligatures problem
I stand corrected.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/