Visit Mozilla.org

CSS:text-rendering

From MDC

« CSS Reference

[edit] Summary

The text-rendering property is used to provide information to the rendering engine about what sorts of tradeoffs to make when rendering text, in order to optimize speed or legibility.

This is an SVG property that is also applicable to HTML and XML content.

[edit] Syntax

 text-rendering: auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit

[edit] Values

  • auto : Gecko will make educated guesses about when to optimize for speed, legibility, and geometric precision while drawing text
  • optimizeSpeed : Gecko will emphasize rendering speed over legibility and geometric precision while drawing text
  • optimizeLegibility : Gecko will emphasize legibility over rendering speed and geometric precision; in Gecko 1.9, this enables kerning and optional ligatures
  • geometricPrecision : Gecko will emphasize geometric precision over rendering speed and legibility

[edit] Examples

View Live Examples

p.fast { text-rendering: optimizeSpeed; }

p.pretty { text-rendering: optimizeLegibility; }

[edit] Specifications

[edit] Browser compatibility

Browser Lowest Version
Internet Explorer ?
Gecko 1.9 (Firefox 3)
Opera ?

[edit] See also

text-indent, text-align, text-decoration, letter-spacing, word-spacing, text-transform, white-space, white-space-collapse, text-rendering, text-wrap, text-shadow