使用 Cufon 有什么缺点? sIFR 仍然是一个好的选择吗? @font-face 并不能让字母像 cufon 或 sIFR 那样平滑
使用 Cufon 有什么缺点?在网络标准、可访问性和性能方面。
我认为如果我们需要流畅的文本,那么 sIFR 仍然是屏幕阅读器兼容性最好的选择。
使用@font-face字体看起来不像Cufon和Sifr那样平滑。但 Cufon 对每个字母都使用画布标签,这使得屏幕阅读器更难阅读。
为了使字体平滑,sIFR仍然是最好的和可访问性兼容性解决方案吗?
是否可以使用 @font-face 获得像 Image、sIFR 和 cufon 这样的抗锯齿功能?
What are cons to use Cufon? in term of Web Standards, Accessibility and Performance.
I think if we need smooth text than sIFR is still best with screen reader compatibility.
With @font-face font doesn't look smooth like Cufon and Sifr. but Cufon use canvas tag for each letter which it maked harder to read for screenreaders.
To make font smooth is sIFR still best and accessibility compatibility solution?
Is it possible to get Anti-aliasing like Image, sIFR and cufon with using @font-face?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最好的解决方案是使用@font-face。 @font-face 已经有故障安全解决方案。 sIFR 和 Cufon:
查看 Fontsquirrel 的字体生成器 用于故障安全解决方案。
锯齿状的边角主要是由操作系统字体 API 造成的。如果您确实需要平滑的角字体,而不是依赖 js/flash,我建议在服务器端生成图像并使用适当的 alt 标签。
The best solution is to use @font-face. There are already fail-safe solutions for @font-face. sIFR and Cufon:
Look at the Fontsquirrel's font-face generator for a fail-safe solution.
The jagged corners are mostly caused by the operating systems font API. If you really do need to have smooth cornered fonts, instead of relying on js/flash, I'd suggest generating images on server side and with proper alt tags.
我自己刚刚对这个主题做了很多研究。平滑渲染的文本对我来说很重要。我坚持使用 sIFR——根据 Google Analytics,我网站的绝大多数访问者都拥有支持 Flash 的浏览器,因此我知道我的文本适合他们。而且,sIFR 非常适合 SEO 和文本阅读器。 (如果这对您很重要,也可以选择。)如果我的访问者使用 iPad 或 iPhone,我也很擅长,因为 Apple 产品可以精美地呈现文本,而且我对当前选择的较小的网络安全字体感到满意我的网站上的文字。 (对于较大的标题,我使用带有 alt 属性的基于图像的文本。)如果 Cufon 只允许对齐文本,我会选择它,因为它比 sIFR 以及 JavaScript 动画更容易使用。 (我真的希望 Cufon 能够允许对齐文本!你可以右对齐、左对齐和居中对齐,但不能对齐——这对我来说是一个破坏性的事情,从我读到的内容来看,没有计划允许对齐文本。)注意——在 Flash CS4 中制作 SWF 字体文件时,我无法让 sIFR 工作——我已在此论坛上寻求帮助——但它在 CS3 中工作得很好。
@font-face 依赖于其文本出现的浏览器的渲染引擎,因此它在 Windows 计算机上很可能看起来有别名。 Google Web Fonts 以及 Typekit 和类似服务都是如此。当与 alt 属性一起使用时,对于非常简短的句子或单词来说,基于图像的文本很好,但在处理大块文本时,如果您希望屏幕阅读器和搜索引擎能够读取该文本,那么这并不是解决方案。编辑基于图像的文本也很痛苦,因为您必须在 Photoshop 中完成。
对我来说,字体替换的重点是在 Windows 计算机上平滑地呈现文本,因为它们是我网站的最大流量来源。能够通过 Flash 输出任何字体也很好。
一旦我确信我的网站的绝大多数流量都有支持 CSS3 的浏览器,我就会使用网络安全字体实现 CSS3 文本平滑选项 - 我将为此查看我的 Google Analytics 数据。
I've just done a lot of research on this subject myself. Having smoothly-rendered text is important to me. I'm sticking with sIFR--according to Google Analytics, the vast majority of the visitors to my web site have Flash-enabled browsers so I know that my text will look good for them. And, sIFR is totally fine with SEO and text readers. (It's also selectable too if that's important to you.) If my visitors are using an iPad or iPhone, I'm good there too because Apple products render text beautifully and I'm content with the current selection of web-safe fonts for smaller text on my site. (For larger titles, I use image-baed text with alt attributes.) If Cufon only allowed for justified text, I'd go with that since it's easier to work with than sIFR as well as with javascript animations. (I really wish Cufon would allow for justified text! You can align right, left and center, but not justify--a deal-breaker for me and from what I read, there are no plans to allow for justified text.) One more note--I cannot get sIFR to work when making my SWF font files in Flash CS4--I've asked for help with this on this forum--but it works fine with CS3.
@font-face relies on the rendering engine of the browsers its text is appearing in so it may very well look aliased on Windows machines. This is true of Google Web Fonts and, I assume, of Typekit and similar services. Having image-based text is fine for very brief sentences or words when used with alt attributes, but that's no solution when dealing with large blocks of text--if you want that text to be readable to screen readers and search engines. It's also a pain to edit image-based text too as you have to do it in Photoshop.
For me, the major point of typeface replacement is smoothly rendering text on Windows machines since they're the largest source of traffic to my site. Being able to have any font I can output through Flash is nice too.
I'll implement CSS3 text-smoothing options with web-safe fonts once I'm confident that the vast majority of traffic to my site has CSS3-supported browsers--I'll be watching my Google Analytics data for that.
不幸的是,所有这些选项之间都存在权衡,您只需根据研究做出决定。每个场景都不同。最好的渲染?最佳加载时间? EULA 问题?是否需要在 iPad/iPhone 上?您需要快速的开发时间吗?你愿意忍受错误吗?
就我个人而言,当我能得到@font-face时,我更喜欢它——它是目前最容易实现的。
Unfortunately, there are trade offs among all of these options, and you just have to make the decision based on research. EACH scenario is different. Best rendering? Best load time? EULA issues? Does it need to be on iPad/iPhone? Do you need rapid dev time? Are you willing to put up with bugs?
Personally, I favor @font-face when I can get it -- it's currently the easiest to implement.