[visionegg] Re: unicode problem

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Fri, 27 Nov 2009 16:21:19 -0800

Andrew Straw wrote:
Andrew Straw wrote:
Felix Engelmann wrote:
Thanks, Andrew, for your prompt reply!
I found that Mangal displays hindi characters in this case but does
not do the hindi-specific letter clustering, which is essential. Also,
now it only shows hindi and nothing else. Before switching to python I
used a software called "Presentation" which is entirely utf8 and
displays Hindi etc. with every font.


I investigated further, and I think I understand what's going on. I think I have a solution for you: the Chandas font. I tested on Ubuntu Karmic (9.10) with the ttf-devanagari-fonts package, which installs the file /usr/share/fonts/truetype/ttf-devanagari-fonts/chandas1-2.ttf. I don't thing there's anything specific to Ubuntu, however, and I suspect with the same font in Windows, it will also render OK. I think you can also download this font from http://www.sanskritweb.org/cakram/ , and I found this at http://www.unifont.org/fontguide/

I don't know if the Hindi-specific letter clustering is OK. Can you tell by the attached screenshot?

That being said, I don't think there's anything exactly wrong with the VE or its dependencies. As far as sometimes rendering glyphs and sometimes not -- I suspect that in the VE and its chain, only a single font is used, whereas other rendering engines will have a set of fallback fonts to look for glyphs in case it's not in the preferred font. Does that sound possible to you? Maybe pygame/SDL TTF would appreciate hearing this as a proposed feature.

I made a few small changes to VE in my attempts to improve things, but nothing that should actually matter as long as you specify the font file OK. (You can see these changes at http://github.com/visionegg/visionegg/commits/master .)

-Andrew

--
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/

PNG image

Other related posts: