Difference between revisions of "Improve Font Rendering/en"

Updating to match new version of source page
(Updating to match new version of source page)
 
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
__TOC__
__TOC__
===How to improve font rendering with your installed fonts===
 
==How to improve font rendering with your installed fonts==


A little configuration maybe required to render the fonts in an optimal manner. Follow the steps illustrated below.
A little configuration maybe required to render the fonts in an optimal manner. Follow the steps illustrated below.
Line 8: Line 9:
''1. Create the global fontconfig setting file /etc/fonts/local.conf''
''1. Create the global fontconfig setting file /etc/fonts/local.conf''


  sudo nano /etc/fonts/local.conf
  {{UserCmd|command=sudo nano /etc/fonts/local.conf}}


Paste the following content in the file
Paste the following content in the file
Line 16: Line 17:
  <fontconfig>
  <fontconfig>
   <match target="font">
   <match target="font">
     <edit name="autohint" mode="assign">
     <edit name="antialias" mode="assign">
       <bool>false</bool>
       <bool>true</bool>
     </edit>
     </edit>
     <edit name="hinting" mode="assign">
     <edit name="hinting" mode="assign">
       <bool>true</bool>
       <bool>true</bool>
     </edit>
     <edit mode="assign" name="rgba">
    <edit name="antialias" mode="assign">
       <const>rgb</const>
       <bool>true</bool>
     </edit>
     </edit>
     <edit mode="assign" name="hintstyle">
     <edit mode="assign" name="hintstyle">
       <const>hintslight</const>
       <const>hintslight</const>
    </edit>
    <edit mode="assign" name="rgba">
      <const>rgb</const>
     </edit>
     </edit>
     <edit mode="assign" name="lcdfilter">
     <edit mode="assign" name="lcdfilter">
Line 42: Line 39:


''2. Create backup of ~/.Xresources file:''
''2. Create backup of ~/.Xresources file:''
  cp ~/.Xresources ~/.Xresources.bak
  {{UserCmd|command=cp ~/.Xresources ~/.Xresources.bak}}


If the .Xresources file has not been already created and you get the error
If the .Xresources file has not been already created and you get the error
Line 50: Line 47:


''3. Open/Create ~/.Xresources file in text editor:''
''3. Open/Create ~/.Xresources file in text editor:''
  nano ~/.Xresources
  {{UserCmd|command=nano ~/.Xresources}}


If the following is not already present, paste at the end of the file or edit existing values:
If the following is not already present, paste at the end of the file or edit existing values:
Line 56: Line 53:
  Xft.antialias: 1
  Xft.antialias: 1
  Xft.hinting: 1
  Xft.hinting: 1
Xft.autohint: 0
  Xft.rgba: rgb
  Xft.rgba: rgb
  Xft.hintstyle: hintslight
  Xft.hintstyle: hintslight
Line 65: Line 61:


''4. Run the following command in terminal:''
''4. Run the following command in terminal:''
  xrdb -merge ~/.Xresources
  {{UserCmd|command=xrdb -merge ~/.Xresources}}




''5. Make sure that ''Anti aliasing is '''On''', Hinting is set to '''Slight'''''  and RGBA (subpixel) order is set to '''rgb''' in System Settings (Appearence).''
''5. Make sure that ''Anti aliasing is '''On''', Hinting is set to '''Slight'''''  and RGBA (subpixel) order is set to '''rgb''' in System Settings (Appearance).''




''6. Create symbolic links with some available presets from /usr/share/fontconfig/conf.avail/ to /etc/fonts/conf.d/''
''6. Create symbolic links with some available presets from /usr/share/fontconfig/conf.avail/ to /etc/fonts/conf.d/''


  sudo ln -s  /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/
  {{UserCmd|command=sudo ln -s  /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/}}


  sudo ln -s  /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/
  {{UserCmd|command=sudo ln -s  /usr/share/fontconfig/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d/}}
 
{{UserCmd|command=sudo ln -s  /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/}}




Line 82: Line 80:
Create local fontconfig folder and setting file
Create local fontconfig folder and setting file


  mkdir -p ~/.config/fontconfig/
  {{UserCmd|command=mkdir -p ~/.config/fontconfig/}}


  nano ~/.config/fontconfig/fonts.conf
  {{UserCmd|command=nano ~/.config/fontconfig/fonts.conf}}


Paste the following content in the file
Paste the following content in the file
Line 119: Line 117:
     <prefer>
     <prefer>
       <family>Liberation Mono</family>
       <family>Liberation Mono</family>
    </prefer>
  </alias>
  <alias>
    <family>system-ui</family>
    <prefer>
      <family>Liberation Sans</family>
     </prefer>
     </prefer>
   </alias>
   </alias>
Line 131: Line 123:




''8. Finally rebuild fontconfig cache and reboot your computer to apply the settings.''
''8. Finally enable freetype2 infinality mode and reboot your computer.''
 
add line to end of freetype2 config file and then rebuild fontconfig cache
 
{{UserCmd| command=sudo nano /etc/profile.d/freetype2.sh}}
 
{{UserCmd| command=export FREETYPE_PROPERTIES="truetype:interpreter-version=38"}}


  sudo fc-cache -fv
  {{UserCmd|command=sudo fc-cache -fv}}


=See Also=
==See Also==  




8,138

edits