Enabling Pango in Firefox (to Enable Sinhala)
Tagged:

The two GNU/Linux distros I'm paying the most attention to are Fedora Core and Ubuntu. Interestingly, these two distros decided to address enabling Pango in Firefox in completely different ways.

Fedora Core 5

Since Fedora Core 4, Pango is ENABLED in Firefox by default. In order to DISABLE Pango in Firefox, an environment variable has to be set:

MOZ_DISABLE_PANGO=1

You can see the difference by running Firefox at the command line like so:

# MOZ_DISABLE_PANGO=1 firefox

/usr/bin/firefox contains an explanation:

-------------------------------------------------------------------
##
## In order to better support certain scripts (such as Indic and some CJK 
## scripts), Fedora builds its Firefox, with permission from the Mozilla 
## Corporation, with the Pango system as its text renderer.  This change 
## is known to break rendering of MathML, and may negatively impact 
## performance on some pages.  To disable the use of Pango, set 
## MOZ_DISABLE_PANGO=1 in your environment before launching Firefox.
##
#
# MOZ_DISABLE_PANGO=1
# export MOZ_DISABLE_PANGO
#
-------------------------------------------------------------------

Ubuntu 6.06

On the other hand Ubuntu 6.06, decided to DISABLE Pango in Firefox by default except for a pre-determined list of locales.

The extensive discussion can be found here:
https://launchpad.net/distros/ubuntu/+source/firefox/+bug/32561

/usr/bin/mozilla-firefox contains the code:

-------------------------------------------------------------------
if [ "x${MOZ_DISABLE_PANGO}" = x ]; then
    if egrep '^(bn|gu|hi|kn|ml|mr|ne|pa|ta|te)_' \
        /var/lib/locales/supported.d/*[^~] >/dev/null 2>&1; then
        MOZ_DISABLE_PANGO=0
    else
        MOZ_DISABLE_PANGO=1
    fi
    export MOZ_DISABLE_PANGO
fi
if [ "x${MOZ_DISABLE_PANGO}" = x0 ]; then
    unset MOZ_DISABLE_PANGO
fi
-------------------------------------------------------------------

This means that Ubuntu 6.06 users that need to ENABLE Pango in Firefox need to set an environment variable:

MOZ_DISABLE_PANGO=0

You can see the difference by running Firefox at the command line like so:

# MOZ_DISABLE_PANGO=0 mozilla-firefox