3

I use Trisquel 7.0 LTS with GNOME 3 Flashback installed.

Combined devanagari fonts like: श्री is not displaying (and hence printing) correctly.

Example- The latter should be displayed as follows:

  1. enter image description here
  2. enter image description here

But currently displaying as follows:

  1. enter image description here
  2. enter image description here

So, how do I fix it?

I am facing this problem in every text fields such as: text-editor, LibreOffice, web-browser etc except with pdf.

Rarely it displays correctly in web-page but when I copy and paste it to gedit or libreoffice, facing mentioned problem.

Ask me if any information required to be provided with question in order to analyse and fix this issue.

  • Browsers, Gnome/Gtk apps like Gedit, and LibreOffice use three different font processing stacks. This isn't a single issue. That being said having the latest fontconfig, Harfbuzz, and Graphite libraries installed is a good place to start. Can you tell us what versions of those as well as LibreOffice you are running. Also what font are you testing with? – Caleb Dec 8 '15 at 10:14
  • @Caleb LibreOffice Version:4.2.6.3 & Gedit Version:3.10.4. Changing/applying fonts doesn't affect it (try "श्री",mentioned in 1st line) ; LibreOffice shows language Hindi at bottom/status bar. Changing language also not affecting however. – Pandya Dec 8 '15 at 12:23
2

The solution is to install appropriate font package to the system which is ttf-devanagari-fonts here. (You can search on repository).

ttf-devanagari-fonts - Free TrueType fonts for languages using the Devanagari script

Package Description:

Description: Free TrueType fonts for languages using the Devanagari script Fonts for languages that use the Devanagari script in writing. This package has fonts for Hindi, Kashmiri, Konkani, Marathi, Maithili, Nepali, Sanskrit, and Sindhi languages.

So, sudo apt-get install ttf-devanagari-fonts installs the devanagari fonts:

$ ls /usr/share/fonts/truetype/ttf-devanagari-fonts/
chandas1-2.ttf  lohit_kok.ttf  lohit_mai.ttf  lohit_ne.ttf  nakula.ttf    samanata.ttf           Sarai_07.ttf
kalimati.ttf    lohit_ks.ttf   lohit_mr.ttf   lohit_sd.ttf  sahadeva.ttf  Samyak-Devanagari.ttf

Now, Devanagari fonts are displaying correctly.


Update: For the latest current (LTS) version of Trisquel GNU Linux i.e 8.0 Flidas, install the following package:

$ apt-cache search fonts-deva
fonts-deva - Meta package to install all Devanagari fonts
fonts-deva-extra - Free fonts for Devanagari script

And then set Lohit Devanagari by creating following configuration file as described here:

$ cat .config/fontconfig/conf.d/10-prefer-devanagari.conf 
<?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>

Logout and re-login to get the effect.

1

You could also give it try to new Google Noto fonts they are amazing. Download them from the link and then.

Goto Home Directory> press ctrl + h(if your files are hidden) then create a folder .fonts (if not already present) then just paste the fonts you downloaded.

Google Noto Font Link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.