0

I want to change system font used by applications globally (or per user) in CentOS. How to do that? Perhaps I should modify ~/.config/fontconfig/fonts.conf file? I would like to set Tahoma font for applications like it was in WinXP.

7
  • What desktop environment are you using? Gnome?
    – Mikel
    Jul 26, 2019 at 0:57
  • No desktop, just X11 via console. Jul 26, 2019 at 8:00
  • Can you give some example applications you want to change to font in? Usually the way I would suggest is to change the GTK and Qt themes.
    – Mikel
    Jul 26, 2019 at 13:09
  • For example - NetBeans. I can set the font of NetBeans text editor, output window, etc., but not L&F font - the system font. Jul 26, 2019 at 13:14
  • NetBeans uses Java Swing. Does this help? stackoverflow.com/questions/12021949/…
    – Mikel
    Jul 26, 2019 at 14:37

1 Answer 1

0

As a solution - inserted lines below to file /etc/fonts/fonts.conf:

    <!-- Fallback fonts preference order -->
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Tahoma</family>
            <family>Arial</family>
        </prefer>
    </alias>
    <alias>
        <family>serif</family>
        <prefer>
            <family>Times New Roman</family>
        </prefer>
    </alias>
    <alias>
        <family>monospace</family>
        <prefer>
            <family>Courier New</family>
        </prefer>
    </alias>


  <match target="font">
      <edit name="antialias" mode="assign">
          <bool>false</bool>
      </edit>
      <edit name="hinting" mode="assign">
          <bool>true</bool>
      </edit>
      <edit name="autohint" mode="assign">
          <bool>false</bool>
      </edit>
      <edit name="hintstyle" mode="assign">
          <const>hintfull</const>
      </edit>
  </match>

Then updated font cache with fc-cache. Now desired fonts available system wide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .