Fonts: Difference between revisions

imported>Erikarvstedt
m '-f' arg is not needed
imported>LinArcX
Set multiple fonts for different languages
Line 32: Line 32:
# Verify that the font has been installed
# Verify that the font has been installed
fc-list -v | grep -i source
fc-list -v | grep -i source
</syntaxhighlight>
=== Set multiple fonts for different languages ===
If you are not an english native user and want to use another languages alongside english, you may want to set appropriate fonts for each language in your whole os. In nixos, it's so easy. Imagine i'm a persian user and i want to set "Vazir" font to persian texts and "Ubuntu" font for english texts. Just put these lines into your configuration.nix:
<syntaxhighlight lang="nix">
#----=[ Fonts ]=----#
  fonts = {
enableDefaultFonts = true;
    fonts = [
          pkgs.ubuntu_font_family
          # Persian Fonts
          pkgs.vazir-fonts
];
fontconfig = {
    penultimate.enable = false;
    defaultFonts = {
serif = [ "Vazir" "Ubuntu" ];
  sansSerif = [ "Vazir" "Ubuntu" ];
  monospace = [ "Ubuntu" ];
    };
};
  };
</syntaxhighlight>
</syntaxhighlight>