Skip to content

Instantly share code, notes, and snippets.

@christopheranderton
Last active February 22, 2016 07:28
Show Gist options
  • Save christopheranderton/7164430 to your computer and use it in GitHub Desktop.
Save christopheranderton/7164430 to your computer and use it in GitHub Desktop.
Note: This is a old Gist. It may be deprecated. | Standards CSS Font Feature Settings instead of non CSS standard optimizeLegibility. However, it seems that Blink-based browsers (Chrome and Opera) adds extra padding for every word, thus breaking some layouts (specially grid based ones and css menus). Firefox and WebKit (Safari) does not seems to…
/* While most people are using text-rendering: optimizeLegibility;
* in their projects for better text rendering, it's actually non
* standard CSS (it's a SVG property).
* The standard way is to use the font feature settings for OpenType.
* The snippet below replicates text-rendering: optimizeLegibility;
*------------------------------------------------------------------- */
-moz-font-feature-settings:"kern" 1, "liga" 1;
-moz-font-feature-settings:"kern=1, liga=1";
-ms-font-feature-settings:"kern" 1, "liga" 1;
-o-font-feature-settings:"kern" 1, "liga" 1;
-webkit-font-feature-settings:"kern" 1, "liga" 1;
font-feature-settings:"kern" 1, "liga" 1;
/* This enables kerning and common ligatures, as does text-rendering: optimizeLegibility;
* Most modern browsers have support for this. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment