Font smoothing and anti-aliasing rendering in CSS3

Source: Internet
Author: User
While watching the official Drupal theme, I found an interesting non-standard CSS selector -webkit-font-smoothing , so I started playing with it. How do I use CSS3 fonts to smooth the display?

To be aware, there have been concerns about anti-aliasing rendering of fonts in CSS, such as Font-smooth, but there may be differences in font rendering between different operating systems and browser cores, in short, he has not been selected for the Web Standard. But WebKit still retains a set of its own non-standard selectors to support anti-aliasing to make the font display smoother.

-webkit-font-smoothingThere are three main properties:

  • None: no anti-aliasing

  • Subpixel-antialiased (default): Sub-pixel smoothing is common in Mac OS and Mactype for Windows

  • Antialiased: Grayscale smoothing is commonly used in mobile devices such as Android and iOS.

But after trying, my wood eyes couldn't tell the difference between the two. And this non-standard CSS is only available for most mobile browsers and desktop browsers such as Safari and chrome, such as the WebKit kernel. As for IE series, you don't support yourself, blame me ~

Here is a look at the actual effect, first of all, there is no anti-aliasing rendering:

The following is -webkit-font-smoothing: subpixel-antialiased the effect of smoothing with anti-aliasing rendering:

It can be seen that the font edge of the smoothness is not the same, plus it really looks a lot.

It has been tested that the browser's built-in base properties generally contain font antialiasing. But for the sake of insurance, let's add one manually.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.