-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> naveen khajuria writes:
    naveen> Hi All

    naveen> I wish to write an X Windows program in C to
    naveen> create a window and write some text on the window.
    naveen> The problem is that I am unable to grasp how to
    naveen> render hindi text on an X Window using a X window
    naveen> system APIs in C.

I assumed you're using Xlib .

    naveen> I could also use Gtk to do the job but the problem is
    naveen> the same, I dont know how to use hindi font in GTK also.

    naveen> Any pointers, cues, clues, webhints, code snippets are welcome..

You probably have to use Xft[1] + m17n[2] or pango[3]. Check out
hello-x-world.c[4], this renders a devanagari text using Xft using
'Lohit Hindi' font, although it doesn't do anything specific to Indic
script. Also check out the paper titled "Introduction to i18n"[5].

I also tried using X server's built-in font, in
'DrawHelloWorldStringXLFD' routine, but unsuccessful. I tried using
fontsets also, but that also didn't worked.

    naveen> looking for some answers...

    naveen> I am using FC 6 and have hindi fonts installed on the system,
    naveen> I just dont know how to render them on a X/Gtk window using
    naveen> a C program.

Upgrade to some recent distro, there might be some improvements in
rendering.

References:
[1] - http://keithp.com/~keithp/talks/xtc2001/paper/
[2] - http://www.m17n.org/m17n-lib-en/
[3] - http://www.pango.org/
[4] - http://wahjava.googlepages.com/hello-x-world.c
[5] - http://www.debian.org/doc/manuals/intro-i18n/intro-i18n.txt

HTH
- -- 
Ashish Shukla आशीष शुक्ल                      http://wahjava.wordpress.com/
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkhO6MMACgkQHy+EEHYuXnR0VQCgxEAuVvuxjGN/lRrQp6uMAcZ0
cP4AniG1rM2BOfEzn7/4zubBIj2Enxkr
=PBEH
-----END PGP SIGNATURE-----

_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22-24, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to