Article
home/blog/Loading

Ensure fonts render nicely in Google Chrome on Linux

Be default linux does not tell fonts to render with antialiasing and other nice features.

To ensure that Google Chrome renders these fonts with all features you need to create a file in the location of ~/.fonts.conf and place the following into it.

micro ~/.fonts.conf

File Contents

<?xml version='1.0'?> 
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> 
<fontconfig> 
 <match target="font"> 
  <edit mode="assign" name="rgba"> 
   <const>rgb</const> 
  </edit> 
 </match> 
 <match target="font"> 
  <edit mode="assign" name="hinting"> 
   <bool>true</bool> 
  </edit> 
 </match> 
 <match target="font"> 
  <edit mode="assign" name="hintstyle"> 
   <const>hintslight</const> 
  </edit> 
 </match> 
 <match target="font"> 
  <edit mode="assign" name="antialias"> 
   <bool>true</bool> 
  </edit> 
 </match> 
  <match target="font"> 
  <edit mode="assign" name="lcdfilter"> 
    <const>lcddefault</const> 
  </edit> 
  </match> 
</fontconfig>