VideosMy ProjectsProgramming BlogGallery
  1. Home
  2. Blog
  3. Ensure fonts render nicely in Google Chrome on Linux
Programming Blog

Atom/RSS Feed

linux

Ensure fonts render nicely in Google Chrome on Linux

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> 
Join my mailing list