简体   繁体   English

使用Cufon有什么用? sIFR还是不错的选择吗? @ font-face不会像使用cufon或sIFR那样使字母平滑

[英]What are cons to use Cufon? Is sIFR still good option? @font-face doesn't make the letters smooth like they look with cufon or sIFR

What are cons to use Cufon? 使用Cufon有什么用? in term of Web Standards, Accessibility and Performance. 在Web标准,可访问性和性能方面。

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. 使用@ font-face字体看起来不像Cufon和Sifr那样流畅。 but Cufon use canvas tag for each letter which it maked harder to read for screenreaders. 但是Cufon为每个字母使用了canvas标签,这使得屏幕阅读器更难以阅读。

To make font smooth is sIFR still best and accessibility compatibility solution? 为了使字体平滑,sIFR仍然是最好的和可访问性兼容性解决方案?

Is it possible to get Anti-aliasing like Image, sIFR and cufon with using @font-face? 是否可以使用@ font-face获得像Image,sIFR和cufon这样的抗锯齿?

The best solution is to use @font-face. 最好的解决方案是使用@ font-face。 There are already fail-safe solutions for @font-face. @ font-face已有故障安全解决方案。 sIFR and Cufon: sIFR和Cufon:

  1. make it hard or even not possible to select/copy text 使选择/复制文本变得困难甚至不可能
  2. stop working when js is disabled 禁用js时停止工作

Look at the Fontsquirrel's font-face generator for a fail-safe solution. 查看Fontsquirrel的字体 - 面生成器,以获得故障安全解决方案。

The jagged corners are mostly caused by the operating systems font API. 锯齿状的角主要是由操作系统字体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. 如果你真的需要光滑的角落字体,而不是依靠js / flash,我建议在服务器端生成图像并使用正确的alt标签。

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. 我坚持使用sIFR - 根据谷歌分析,我的网站的绝大多数访问者都有支持Flash的浏览器,所以我知道我的文本对他们来说会很好。 And, sIFR is totally fine with SEO and text readers. 而且,sIFR对SEO和文本阅读器来说完全没问题。 (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. (如果这对你很重要,它也可以选择。)如果我的访客使用iPad或iPhone,我也很好,因为Apple产品渲染文字很漂亮而且我满足于当前选择的较小的网页安全字体我网站上的文字。 (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. (对于较大的标题,我使用带有alt属性的图像文本。)如果Cufon只允许对齐文本,我会选择它,因为它比sIFR以及javascript动画更容易使用。 (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. (我真的希望Cufon允许合理的文本!你可以左右对齐,但不能证明 - 对我来说是一个交易破坏者,从我读到的,没有计划允许合理的文本。)还有一个注意 - 我在Flash CS4中制作SWF字体文件时无法使用sIFR - 我已在此论坛上寻求帮助 - 但它适用于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. @ font-face依赖于其文本出现的浏览器的呈现引擎,因此它可能很好地在Windows机器上看起来有别名。 This is true of Google Web Fonts and, I assume, of Typekit and similar services. Google Web Fonts和我认为的Typekit和类似服务都是如此。 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. 当使用alt属性时,基于图像的文本适用于非常简短的句子或单词,但是当处理大块文本时这不是解决方案 - 如果您希望屏幕阅读器和搜索引擎可以读取该文本。 It's also a pain to edit image-based text too as you have to do it in Photoshop. 编辑基于图像的文本也很痛苦,因为你必须在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. 对我来说,字体替换的主要方面是在Windows机器上平滑地呈现文本,因为它们是我网站的最大流量来源。 Being able to have any font I can output through Flash is nice too. 能够通过Flash输出的任何字体都很好。

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. 一旦我确信我的网站的绝大部分流量都支持CSS3支持的浏览器,我将使用网络安全字体实现CSS3文本平滑选项 - 我会关注我的Google Analytics数据。

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? EULA问题? Does it need to be on iPad/iPhone? 它需要在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. 就我个人而言,我赞成@ font-face,这是目前最容易实现的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM