7

Devanagari fonts appear broken like this:

It should appear this way

I have the same problem in browsers and office applications.

Is there any way to fix it?

pomsky
  • 70,557

4 Answers4

11

Install the fonts-deva package, if you haven't already done so. Then create the file ~/.config/fontconfig/conf.d/10-prefer-devanagari.conf with the following contents:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Lohit Devanagari</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Lohit Devanagari</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Lohit Devanagari</family>
                </prefer>
        </alias>
</fontconfig>
2

Download Google Noto Fonts (choose Noto Sans Devanagari) and add it to Home > .fonts

If .fonts folder is not available in Home folder create it.

.fonts folder will be hidden by default. Use CTRLH to see hidden files and folders before creating a .fonts folder.

You can use other Google Noto Fonts for any Indic language you would like to use.

If you want to have different font weights, choose fonts with those qualities.

This is just one simple way of doing it. There could be a thousand other ways to use Devanagari fonts in Ubuntu.

muru
  • 207,228
user227495
  • 4,309
0

Just Go to Settings of Browser And Select Gargi Font from Drop Down.

For Firefox :

  1. Go to From Menu preferences.

  2. Under Language & Appearance Default Font Set it To Gargi.

  3. Click On Advance Tab Next To Default Font Settings.

  4. Then Set Fonts For "Devnagari" from Drop Down.

  5. Set Serif San-serif & Monospace to Gargi.

You Can Instantly Check using Google Typing Tool Online.

For Chrome:

  1. Settings->Appearance Set All Fonts Value to Gargi From Drop Down Menu.

  2. Then From Advanced Tab Install Extension For "Advanced Font Settings"

  3. In Than Set All Fonts to Gargi.

Stephen Rauch
  • 1,156
  • 6
  • 15
  • 21
0

This is happening because of fonts.

To render any language text, font should support that text. Default fonts of Ubuntu does not render Devanagari correctly.

In order to correctly show devanagari text, we need a font which is fully supporting devanagari.

To setup the correct font we need to do following steps.

  1. Download Noto Sans Devanagari. This package contains many fonts.
  2. Open Home folder and check for hidden files. You can use Ctrl + H for the same.
  3. If you cannot find .font folder, create one. Extract downloaded zip file into this folder. This step will integrate all these fonts into Ubuntu. So technically you can use any of these fonts in any of the software.
  4. Open settings of chrome. Search for font. Click on Customize Fonts.
  5. Change Standard Font to Lohit Devanagari or any other font which renders devanagari correctly.

To render devanagari correctly in any other software, we can do the same by selecting font as Lohit Devanagari.

Yuvraj Patil
  • 113
  • 4