Search code examples
csswebkitgeckotext-renderingligature

Does font-size affect the rendering of ligatures?


Gecko and Webkit browsers support rendering of ligatures ff fi fl ffl via text-rendering: optimizeLegibility (font must have ligatures, e. g. Calibri).

MDN page says, that only text of size 20px and higher will get ligatures. According to my own research this is not true:

  • Firefox will render ligatures by default;
  • Chrome (& Safari) will render ligatures if you specify text-rendering: optimizeLegibility;
  • both engines seem to don't mind the font size.

Am I missing something here? Or it's just a mistake (outdate?) on MDN page and we should fix it?

[edit] Additional reading: Smashing Magazine's “A Closer Look At Font Rendering”.


Solution

  • Firefox supports a preference browser.display.auto_quality_min_font_size that allows you to adjust the value that it uses to decide whether to choose its font rendering path. However the only part of the code where this is still honoured in current versions of Firefox is on Windows XP where small font sizes or an explicit text-rendering: optimizeSpeed will render using GDI instead of Uniscribe.

    Note that Thunderbird sets the value of that preference to zero for some reason.