Change Default Font for a Specific Language





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















Is there any way to change the default font for a specific language like Persian/Farsi?
I don't want to change the whole font system. I like Ubuntu Font very much but the Persian/Farsi version is very bad and it's difficult to read.
I've Unity Tweak Tool installed but it doesn't provide any option, to change the font for a specific language/font Family.



Any help would be greatly appreciated,
Thanks a lot.
OS: Ubuntu 14.10










share|improve this question































    5















    Is there any way to change the default font for a specific language like Persian/Farsi?
    I don't want to change the whole font system. I like Ubuntu Font very much but the Persian/Farsi version is very bad and it's difficult to read.
    I've Unity Tweak Tool installed but it doesn't provide any option, to change the font for a specific language/font Family.



    Any help would be greatly appreciated,
    Thanks a lot.
    OS: Ubuntu 14.10










    share|improve this question



























      5












      5








      5


      1






      Is there any way to change the default font for a specific language like Persian/Farsi?
      I don't want to change the whole font system. I like Ubuntu Font very much but the Persian/Farsi version is very bad and it's difficult to read.
      I've Unity Tweak Tool installed but it doesn't provide any option, to change the font for a specific language/font Family.



      Any help would be greatly appreciated,
      Thanks a lot.
      OS: Ubuntu 14.10










      share|improve this question
















      Is there any way to change the default font for a specific language like Persian/Farsi?
      I don't want to change the whole font system. I like Ubuntu Font very much but the Persian/Farsi version is very bad and it's difficult to read.
      I've Unity Tweak Tool installed but it doesn't provide any option, to change the font for a specific language/font Family.



      Any help would be greatly appreciated,
      Thanks a lot.
      OS: Ubuntu 14.10







      fonts language default






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 19 mins ago









      Anwar

      57.7k22149257




      57.7k22149257










      asked Mar 16 '15 at 7:45









      bossModusbossModus

      8017




      8017






















          1 Answer
          1






          active

          oldest

          votes


















          6














          You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:



          <?xml version="1.0"?>
          <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
          <fontconfig>
          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>sans-serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>

          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>
          </fontconfig>


          That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.



          $ LANG=fa_IR fc-match
          homa.ttf: "Homa" "Regular"
          $





          share|improve this answer
























          • Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

            – bossModus
            Mar 16 '15 at 18:32











          • @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

            – Gunnar Hjalmarsson
            Mar 16 '15 at 19:10











          • I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

            – HOS
            Mar 3 '18 at 19:35













          • @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

            – Gunnar Hjalmarsson
            Mar 3 '18 at 20:39






          • 1





            @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

            – Gunnar Hjalmarsson
            May 30 '18 at 18:52












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f597342%2fchange-default-font-for-a-specific-language%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          6














          You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:



          <?xml version="1.0"?>
          <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
          <fontconfig>
          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>sans-serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>

          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>
          </fontconfig>


          That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.



          $ LANG=fa_IR fc-match
          homa.ttf: "Homa" "Regular"
          $





          share|improve this answer
























          • Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

            – bossModus
            Mar 16 '15 at 18:32











          • @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

            – Gunnar Hjalmarsson
            Mar 16 '15 at 19:10











          • I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

            – HOS
            Mar 3 '18 at 19:35













          • @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

            – Gunnar Hjalmarsson
            Mar 3 '18 at 20:39






          • 1





            @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

            – Gunnar Hjalmarsson
            May 30 '18 at 18:52
















          6














          You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:



          <?xml version="1.0"?>
          <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
          <fontconfig>
          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>sans-serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>

          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>
          </fontconfig>


          That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.



          $ LANG=fa_IR fc-match
          homa.ttf: "Homa" "Regular"
          $





          share|improve this answer
























          • Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

            – bossModus
            Mar 16 '15 at 18:32











          • @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

            – Gunnar Hjalmarsson
            Mar 16 '15 at 19:10











          • I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

            – HOS
            Mar 3 '18 at 19:35













          • @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

            – Gunnar Hjalmarsson
            Mar 3 '18 at 20:39






          • 1





            @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

            – Gunnar Hjalmarsson
            May 30 '18 at 18:52














          6












          6








          6







          You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:



          <?xml version="1.0"?>
          <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
          <fontconfig>
          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>sans-serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>

          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>
          </fontconfig>


          That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.



          $ LANG=fa_IR fc-match
          homa.ttf: "Homa" "Regular"
          $





          share|improve this answer













          You can create the file ~/.config/fontconfig/conf.d/90-my-farsi.conf and give it this contents as a starter:



          <?xml version="1.0"?>
          <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
          <fontconfig>
          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>sans-serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>

          <match target="pattern">
          <test name="lang" compare="contains">
          <string>fa</string>
          </test>
          <test qual="any" name="family">
          <string>serif</string>
          </test>
          <edit name="family" mode="prepend" binding="strong">
          <string>Homa</string>
          </edit>
          </match>
          </fontconfig>


          That file results in the Homa font (included in the fonts-farsiweb package) being selected at first hand when Persian is the selected language.



          $ LANG=fa_IR fc-match
          homa.ttf: "Homa" "Regular"
          $






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 16 '15 at 9:55









          Gunnar HjalmarssonGunnar Hjalmarsson

          19.8k23462




          19.8k23462













          • Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

            – bossModus
            Mar 16 '15 at 18:32











          • @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

            – Gunnar Hjalmarsson
            Mar 16 '15 at 19:10











          • I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

            – HOS
            Mar 3 '18 at 19:35













          • @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

            – Gunnar Hjalmarsson
            Mar 3 '18 at 20:39






          • 1





            @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

            – Gunnar Hjalmarsson
            May 30 '18 at 18:52



















          • Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

            – bossModus
            Mar 16 '15 at 18:32











          • @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

            – Gunnar Hjalmarsson
            Mar 16 '15 at 19:10











          • I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

            – HOS
            Mar 3 '18 at 19:35













          • @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

            – Gunnar Hjalmarsson
            Mar 3 '18 at 20:39






          • 1





            @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

            – Gunnar Hjalmarsson
            May 30 '18 at 18:52

















          Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

          – bossModus
          Mar 16 '15 at 18:32





          Thanks a lot, outstanding, if I want to change 'Homa' to something else, I should only replace Homa with another font, right?

          – bossModus
          Mar 16 '15 at 18:32













          @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

          – Gunnar Hjalmarsson
          Mar 16 '15 at 19:10





          @williclarkam: Right (it must be installed, of course). If the default setup is "very bad", as you said, you may want to file a bug about it. As an example, if the above file would be an improvement, it could be included by default.

          – Gunnar Hjalmarsson
          Mar 16 '15 at 19:10













          I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

          – HOS
          Mar 3 '18 at 19:35







          I've tried your solution. And in Libreoffice it changes the writing font to the proper font that I've chosen when i change my language to persian. but i want to apply this font system-wide, to see the Persian folder names with that font. system still shows Persian names with Ubuntu's default font. do you know how to fix it?

          – HOS
          Mar 3 '18 at 19:35















          @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

          – Gunnar Hjalmarsson
          Mar 3 '18 at 20:39





          @HOS: That's sounds like a different question, so I'd suggest that you submit a new question. When doing so you can refer to this one if appropriate.

          – Gunnar Hjalmarsson
          Mar 3 '18 at 20:39




          1




          1





          @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

          – Gunnar Hjalmarsson
          May 30 '18 at 18:52





          @Anwar: Wouldn't that motivate a separate question? If you submit a question about it, just ping me, and I'll try to help if I can.

          – Gunnar Hjalmarsson
          May 30 '18 at 18:52


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f597342%2fchange-default-font-for-a-specific-language%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          GameSpot

          connect to host localhost port 22: Connection refused

          Getting a Wifi WPA2 wifi connection