Wednesday, October 03, 2007

Enabling Indic in Firefox on Ubuntu

Do you have problems reading Indic lanaguage websites? Do you see incorrect rendering such as misplaced matras, aadha akshar appearing with a halant? Have you been blaming firefox/Ubuntu for not getting such basic stuff right?
Well not to worry as the fix is a very simple series of steps.

  1. First check if your browser has been compiled with the --enable-pango flag. To check this, type "about:buildconfig"(without quotes) in your address bar and look for the string --enable-pango (See screenshot below). For most people on Ubuntu, this flag should be there, but in case you have one that doesnt have this flag, you will have to obtain a firefox build that was compiled with this option.



  2. Now you will need to set two environment variables, naemly MOZ_ENABLE_PANGO and MOZ_DISABLE_PANGO. To set these variables(On Ubuntu) open the file /etc/environment in your favourtie text editor, and type the following lines at the end:
    MOZ_ENABLE_PANGO=1
    MOZ_DISABLE_PANGO=0

  3. Now you will need to install certain fonts (in case these are not already present), to install these fonts type the following in your terminal(See screenshot to know where to open the terminal from),

    sudo apt-get install ttf-indic-fonts



  4. And thats it, you are done just log off and log in and you should see Indic text being rendered properly. To check, see if you can read this beautiful poem in Hindi properly,
    http://manaskriti.com/kaavyaalaya/kaho_kaise_ho.stm
    If you cant read Hindi open your favourite website and see if it renders properly.
Troubleshooting: In case you still cant get Indic script to render properly, before asking your LUG or any help group gather the following Information:
  1. Your Operating System details: You can get display operating system details by typing uname -a on your terminal.(See above on how to open the terminal)

  2. Your browser version details: In firefox go to Help -> About Mozilla Firefox

  3. Your Browser Build Details: Go to address bad type about:buildconfig

  4. Font Details: On Ubuntu Go To System->Preferences->Fonts and check what Hindi/Tamil/Your Language fonts(if any) you have.
Notes:
  1. For more detailed information on enabling Indic on your system, please visit: http://en.wikipedia.org/wiki/Wikipedia:Enabling_complex_text_support_for_Indic_scripts

  2. Pango is a free and open source computing library for rendering internationalized texts in high quality. Different font backends can be used, allowing cross-platform support, that was written as a part of GTK+ widget toolkit.
    http://www.pango.org/

No comments :