作者:Lululingling2002_886 | 来源:互联网 | 2023-05-17 02:38
IhaveMuseo-300mostlyworkingwith@font-face,butcertainlettercombinationslikeffandfi
I have Museo-300 mostly working with @font-face, but certain letter combinations like "ff" and "fi" are disappearing in Firefox (confirmed in v3.6 and v7.0.1). So "microfinance" becomes "micronance".
我有Museo-300主要使用@ font-face,但某些字母组合如“ff”和“fi”在Firefox中消失(在v3.6和v7.0.1中确认)。所以“小额信贷”变成“微量”。
Note that I'm outputting these as individual letters, not as ligatures. When I view source on both the server and the browser, "coffee" for example is spelled with all six letters individually—not a unicode ligature character for "ff".
请注意,我将这些输出为单个字母,而不是连字。当我在服务器和浏览器上查看源时,例如“coffee”拼写为所有六个字母 - 而不是“ff”的unicode连字符。
The output looks right in Opera, Chrome, Safari, and IE (even IE6).
输出看起来在Opera,Chrome,Safari和IE(甚至是IE6)中都是正确的。
I downloaded Museo-300 from MyFonts along with their web font example template.
我从MyFonts下载了Museo-300及其网络字体示例模板。
@font-face {
font-family: 'Museo-300';
src: url('webfonts/151B6C_0.eot');
src: url('webfonts/151B6C_0.eot?#iefix') format('embedded-opentype'),url('webfonts/151B6C_0.woff') format('woff'),url('webfonts/151B6C_0.ttf') format('truetype'),url('webfonts/151B6C_0.svg#wf') format('svg');
}
and all the referenced files are in place. I invoke it like this:
并且所有引用的文件都已到位。我像这样调用它:
font-family: 'Museo-300', sans-serif;
I tried a different font as a test (Code Pro Light Demo, also gotten from MyFonts) and Firefox dropps "fi" but not "ff" for that one.
我尝试了一种不同的字体作为测试(Code Pro Light Demo,也来自MyFonts)和Firefox下载“fi”而不是“ff”。
An idea what's going wrong?
一个想法出了什么问题?
4 个解决方案
1
In case others hit this problem, I resolved it with help from MyFonts technical support. I'm not sure whether this issues is specific to MyFonts, but I suspect it affects other web font sources.
如果其他人遇到这个问题,我在MyFonts技术支持的帮助下解决了这个问题。我不确定这个问题是否特定于MyFonts,但我怀疑它会影响其他Web字体来源。
Direct (Solvable) Cause
直接(可解决)原因
When a standard True Type font (TTF) gets processed into the multiple versions that are useful for a web font (EOT, SVG, WOFF), the processing tool or vendor can decide whether or not to include the font's full character set. Some will default to a reduced character set to reduce file sizes.
当标准True Type字体(TTF)被处理为对Web字体(EOT,SVG,WOFF)有用的多个版本时,处理工具或供应商可以决定是否包括字体的完整字符集。有些将默认为缩小字符集以减小文件大小。
In my case, one or more of the generated web font files excluded ligatures, presumably considering them to be non-essential typographic tweaks. To fix the problem I used a custom web font builder at MyFonts to generate font files with the full character set.
在我的例子中,一个或多个生成的Web字体文件排除了连字,大概认为它们是非必要的排版调整。为了解决这个问题,我在MyFonts使用了一个自定义Web字体构建器来生成具有完整字符集的字体文件。
(For MyFonts specifically this was at Order History > select relevant font > Webfont Kit Builder tab > Advanced, then check both "Complete Character Set" and "Keep OpenType Layout".)
(对于MyFonts,特别是订单历史>选择相关字体> Webfont Kit Builder选项卡>高级,然后检查“完整字符集”和“保留OpenType布局”。)
Underlying Cause
根本原因
My belief, which is only an educated guess:
我的信念,这只是一个有根据的猜测:
I think Firefox is going out of its way to do nice typography, more so than other browsers. So when it sees something that it could render as a ligature ("fi", "fl", "ff", etc.) it tries to render the letters as a single ligature glyph rather than as two distinct characters. If your web font doesn't include the ligature glyphs, your letters will disappear. (If my guess is right, I'm surprised I haven't read about this problem before.)
我认为Firefox比其他浏览器更能做出漂亮的排版。因此,当它看到可以呈现为连字(“fi”,“fl”,“ff”等)的东西时,它会尝试将字母渲染为单个连字字形而不是两个不同的字符。如果您的网络字体不包含连字字形,则您的字母将消失。 (如果我的猜测是对的,我很惊讶我之前没有读过这个问题。)