Font rendering technology (font anti-aliasing technology)-webkit-font-smoothing:antialiased;

Source: Internet
Author: User

1.-webkit-font-smoothing-controlled font rendering is only valid for MacOS WebKit. So, when you set up-webkit-font-smoothing under the MacOS test environment, as long as you don't set it to none, how nice it is to set the property, anyway, this property is only for MacOS and will not go awry in other contexts (except for the case of none).

2, the front-end control font rendering interface is very scarce, if possible, as far as possible to control the output of the font, rather than control font rendering.

3, the following test will show that-webkit-font-smoothing on MacOS has the effect.

①windows

Test environment: Win7 Pro + Chrome:

Conclusion: The-webkit-font-smoothing attribute on Windows systems does not make a difference.

②ios

Test environment: IPad Air + iOS7 + Safari

(There is no Hiragino Sans GB on iOS, don't be misled by tags!)

Conclusion: On iOS, modify the-webkit-font-smoothing property and the result is:

·  -webkit-font-smoothing:none; No anti-aliasing

·  -webkit-font-smoothing:antialiased | subpixel-antianliased |  Default Grayscale Smoothing

③macos

Test environment: MBP + Safari:

Conclusion: On iOS, modify the-webkit-font-smoothing property and the result is:

·  -webkit-font-smoothing:none; No anti-aliasing

·  -webkit-font-smoothing:subpixel-antialiased |  Default Sub-pixel Smoothing

·  -webkit-font-smoothing:antialiased; Grayscale Smoothing

4, font anti-aliasing technology

The font anti-aliasing technique can be divided into the following categories:

· Black and white rendering: now extinct

• Grayscale rendering: Common terms for mobile devices such as Android and iOS

• Sub-pixel smoothing: Common for Mac OS and Mactype for Windows

· ClearType: A tradeoff between black and white rendering and sub-pixel smoothing. WinXP built-in, default off; Win7 above by default

Ideal shape: black and white rendering, grayscale rendering.

The principle of sub-pixel smoothing, which looks from right to left, notices a gradient in a pixel.

5, from the different platform browser font rendering to the analogy diagram visible clues:

6, the following table is my comprehensive multi-data results, welcome error Correction:

Source: https://segmentfault.com/q/1010000000467910/a-1020000000468107

Font rendering technology (font anti-aliasing technology)-webkit-font-smoothing:antialiased;

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.