CSS中有什么尖锐的样式吗?
我想使用 Photoshop 中的 style-sharp 在我的 css 中设置一些字体的样式。有谁知道路吗?
I want to style some fonts in my css using the style- sharp found in Photoshop. Does anyone know the way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Photoshop 使用自定义字体渲染引擎,您无法使用 CSS 来模拟该引擎。此外,每个平台都有自己的渲染引擎,CSS无法控制。
对于 WebKit,有
-webkit-font-smoothing
但它的功能与您正在寻找的功能相去甚远。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.恐怕运气不好。我所知道的(也许有人不知道)实现此目的的唯一方法是将有问题的文本保存为图像。适合标题等,但不适用于正文。
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.
字体的“清晰度”通常是字体渲染器的一部分,它是操作系统的一部分。您应该检查字体设置。例如,在 Windows 中,尝试关闭 ClearType。
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.
恐怕是浏览器/操作系统的组合决定了字体的抗锯齿方式。你对此无能为力,除了将 Photoshop 输出保存为图像,将其设置为文本所在容器的背景,并通过 css 在其上应用负文本缩进。
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.
有字体平滑的解决方案。
您可以使用 cufon.js 来锐利地渲染您的字体。顺利。该js将您的文本呈现为cufon,如果您右键单击它,它会显示图像。您可以使用它作为标题。
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.