Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable font smoothing in CSS?

I want some small fonts to look with no smoothing. Is it possible to disable font smoothing using HTML/CSS?

like image 596
German Latorre Avatar asked May 10 '12 16:05

German Latorre


2 Answers

Yes, it's possible, but not for all browsers.

font-smooth: auto | never | always | <absolute-size> | length | initial | inherit
-webkit-font-smoothing : none | subpixel-antialiased | antialiased 

For your case:

font-smooth: never;
-webkit-font-smoothing : none;

UPD(for Chrome): Force Font Smoothing in Chrome on Windows

like image 64
Eugene Trofimenko Avatar answered Oct 24 '22 10:10

Eugene Trofimenko


Yes, although I can't say which browsers will take any notice of you!

You can write

<p style="font-smooth:never;">

to get the effect you want.


EDIT

I was sure I had used this some months ago, but I read on the Mozilla Network

Though present in early (2002) drafts of CSS3 Fonts, font-smooth has been removed from this specification and is currently not on the standard track.

Sorry!

like image 28
Borodin Avatar answered Oct 24 '22 09:10

Borodin