Is there any sharp style in CSS?

2019-02-24 12:36发布

问题:

I want to style some fonts in my css using the style- sharp found in Photoshop. Does anyone know the way?

回答1:

Photoshop uses a custom font rendering engine which you won't be able to emulate using CSS. Furthermore, each platform has its own rendering engine which CSS cannot control.

For WebKit there is -webkit-font-smoothing but what it does is a far cry from what you're looking for.



回答2:

No luck I'm afraid. The only way I know of (perhaps someone knows otherwise) to achieve this is to save the text in question as an image. Fine for headings etc., but not for body text.



回答3:

The "sharpness" of a font is usually a thing of the font renderer which is part of the operating system. You should check the font settings. In Windows, for example, try turning off ClearType.



回答4:

I'm afraid it's a browser/os combination that decides how your fonts are anti-aliased. Nothing you can do about it, except save the Photoshop output as an image, set it as a background for whichever container your text appears in and apply a negative text indent on it via css.



回答5:

There is solution for font smoothing.

You can use cufon.js to render your font sharply & smoothly. This js renders your text as a cufon and if you right click on it it shows image. You can use this for heading.