Monospace font in Tamil locale

Monospace font in Tamil locale

Published by Arun Isaac on

In other languages: தமிழ்

Tags: tamil

Monospace fonts are not displayed correctly in a Tamil locale. How do you fix this?

In GNU/Linux, many applications pick fonts using fontconfig. But, in a Tamil locale, fontconfig does not pick English monospace fonts correctly. This is because, in a Tamil locale, fontconfig prioritizes the Tamil language and picks a Tamil font over an English monospace font. So, monospace fonts are not displayed where they should be. To fix this, we need to tell fontconfig to prioritize English fonts instead of trying to infer the language from the locale. We do this by setting the FC_LANG environment variable to en.

export FC_LANG=en

The FC_LANG environment variable is documented in a fontconfig man page.