How can we apply Photoshop-like font anti-aliasing such as crisp, sharp, strong, smooth in CSS?
Are these supported by all browsers?
antialiased - Smooth the font on the level of the pixel, as opposed to the subpixel. Switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter. subpixel-antialiased - On most non-retina displays, this will give the sharpest text.
So, what is anti-aliasing? The simple description of anti-aliasing is that it makes fonts display with smooth curves and angles, not jagged, low res looking edges. So if “anti-aliased ” is smooth, the opposite, hard edged fonts would make sense to be called “aliased.” However, the better term is “bit-mapped.”
Every browser with support for the text-rendering property. Assume every browser smooths fonts, setting text-rendering to geometricPrecision would disable the font smoothing to make the glyphs as precise as possible thereby disabling all font-smoothing and making corners, etc. sharper.
The font-smooth CSS property controls the application of anti-aliasing when fonts are rendered. This feature is non-standard and is not on a standards track. It depends on the browser used and the system specifications; thus, it may not work for every user.
here you go Sir :-)
1
.myElement{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
2
.myElement{ text-shadow: rgba(0,0,0,.01) 0 0 1px; }
Works the best. If you want to use it sitewide, without having to add this syntax to every class or ID, add the following CSS to your css body:
body { -webkit-font-smoothing: antialiased; text-shadow: 1px 1px 1px rgba(0,0,0,0.004); background: url('./images/background.png'); text-align: left; margin: auto; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With