User Tools

Site Tools


tips:how-to-fix-blurry-font-rendering-in-ubuntu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:how-to-fix-blurry-font-rendering-in-ubuntu [31.08.2011 22:31]
vergo
tips:how-to-fix-blurry-font-rendering-in-ubuntu [31.07.2021 00:34] (current)
vergo [Additional changes for more recent FreeType versions]
Line 1: Line 1:
 ====== How to fix blurry font rendering in Ubuntu ====== ====== How to fix blurry font rendering in Ubuntu ======
  
-By default, at least XUbuntu 10.04 comes with font rendering settings that enable antialiasing and hinting in such way that everything looks blurry and soft. With some fonts, the edge of the font also looks like it has a shadow that isn't gray in color but more like a shade of blue or green.+By default, at least Ubuntu 10.04 comes with font rendering settings that enable antialiasing and hinting in such way that everything looks blurry and soft. With some fonts, the edge of the font also looks like it has a shadow that isn't gray in color but more like a shade of red, green or blue. Starting from Ubuntu 17.10, the font rendering also results in a wider blurring than before.
  
 ===== /etc/fonts/conf.d/99-fix-fonts.conf ===== ===== /etc/fonts/conf.d/99-fix-fonts.conf =====
 +
 <code> <code>
 <?xml version="1.0"?> <?xml version="1.0"?>
Line 19: Line 20:
  
 Starting the file name with 99 will force the content to be sourced last when the configuration is read and as a result any settings in the file will override those set elsewhere. The //lcdfilter// setting seems to have the most effect and setting //rgba// to //none// will make the antialiasing to be grayscale instead of seamingly random colors. The documentation for this file is available [[http://www.freedesktop.org/software/fontconfig/fontconfig-user.html|here]]. Starting the file name with 99 will force the content to be sourced last when the configuration is read and as a result any settings in the file will override those set elsewhere. The //lcdfilter// setting seems to have the most effect and setting //rgba// to //none// will make the antialiasing to be grayscale instead of seamingly random colors. The documentation for this file is available [[http://www.freedesktop.org/software/fontconfig/fontconfig-user.html|here]].
 +
 +===== Additional changes for more recent FreeType versions =====
 +
 +Starting from FreeType version 2.7, the hinting style has changed (see [[https://www.freetype.org/freetype2/docs/hinting/subpixel-hinting.html|more detailed documentation]]. However, this results in more blur than with the previously used (v35 interpreter) solution causing again fonts to be less sharp. The older interpreter is still available and can be enabled with the following addition in, for example, /etc/environment or any other file where environment properties can be set before the X server is started:
 +
 +<code>
 +FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=1 autofitter:warping=1"
 +</code>
 +
 +This change require the X server to be restarted or the system rebooted.
  
 ===== Xfce 4 Settings Manager -> Appearance -> Fonts ===== ===== Xfce 4 Settings Manager -> Appearance -> Fonts =====
  
-{{:tips:xfceappearance.png?nolink&300|}}+{{:tips:xfceappearance.png?direct&300|}}
  
-These setting will still affect those programs that don't use fontconfig for selecting font rendering settings. Note that the subpixel order is screen specific when using a TFT display. However, usually it's best to just try every option and see which one provides the most pleasable result.+These setting will still affect those programs that don't use fontconfig for selecting font rendering settings. Note that the subpixel order is screen specific when using a TFT display. However, usually it's best to just try every option and see which one provides the most pleasable result. Selecting 'None' guarantees that the rendering doesn't cause colored edges. The purpose of the subpixel order is the same as lcdfilter in the /etc/fonts/conf.d example.
  
 ===== Before and after comparison ===== ===== Before and after comparison =====
Line 33: Line 44:
  
 |  {{:tips:fontsconfexampledefault300.png?nolink&|}}  |  {{:tips:fontsconfexamplemodified300.png?nolink&|}}  | |  {{:tips:fontsconfexampledefault300.png?nolink&|}}  |  {{:tips:fontsconfexamplemodified300.png?nolink&|}}  |
-|  Default 300% zoom  |  Modified 300% zoom  |+|  Default (300% zoom  Modified (300% zoom |
  
tips/how-to-fix-blurry-font-rendering-in-ubuntu.1314819091.txt.gz ยท Last modified: 31.08.2011 22:31 by vergo