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
  • 68,507
  • Can you include a screen shot? I don't see a broken seeming font (not viewing from an Ubuntu browser at present). – Zeiss Ikon Dec 01 '16 at 12:49
  • I think he mistakenly wrote 6.0 LTS instead of 16.04 LTS. – Ryko Dec 01 '16 at 12:57
  • indeed it's 16.0. it should look like something else in devanagari font. that i am not being able to type here – Pratik Gautam Dec 01 '16 at 13:00
  • "it should look like something else in devanagari font" Hence my suggestion to include a screen capture image. – Zeiss Ikon Dec 01 '16 at 13:08
  • 1
    Is there more than one Devanagari font available you can test with? For instance, like Times New Roman versus Baskerville/Baskervald for English? That would eliminate the specific font file itself as the source of the problem. – Zeiss Ikon Dec 01 '16 at 13:44
  • 1
    The "correct" image helps, but it would help to also have a screen capture of the "broken" font as it appears on your screen. – Zeiss Ikon Dec 01 '16 at 15:16
  • IMO it should actually look like https://i.stack.imgur.com/g41JQ.png (see http://www.pmujjwalayojana.in/wp-content/uploads/2016/04/pradhan-mantri-ujjwala-yojana.jpg for comparison with a image from the Government of India). I use the Noto Sans Devangiri fonts precisely because they usually do the right thing with combining characters – muru Dec 01 '16 at 16:19
  • 1

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>
Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
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
  • 197,895
  • 55
  • 485
  • 740
user227495
  • 4,089
  • 17
  • 56
  • 101
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.

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