浏览器中的连字(开放式字体连字)问题
我正在使用 fontforge 字体编辑器编辑字体,一切都很好,但是在 当我想要制作多字连字(其之间的空格)时,连字在 Firefox 和 Opera 上不起作用,它将与写字板和记事本一起使用。
这是错误还是限制?
我应该怎么做才能解决问题?
注意:我使用 @font-face css 语法导入字体,字体是 ttf。
I am editing font with fontforge font editor everything is good but in
ligature when i want to make multi word ligature (space between it) don't work on firefox and opera ,it will work with word pad and notepad.
is this bug or limit?
what should i do to solve problem?
note:i am using @font-face css syntax to import font and font is ttf.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
连字制作是 OpenType 字体中的一项可选功能。连字的示例是粘合在一起的字母集,例如 fi、ff、fl、ffi、ffl。具有连字的常见字体是 Calibri,它是 Microsoft Office 2007 中的默认字体。
该字体有一个查找表,如下所示:
当您键入等式左侧的字母时,右侧显示的连字会出现并替换当前显示的字符(无论是单个字母还是已经形成的连字)。使用大尺寸的 Calibri 在记事本中输入“困难”即可看到这种情况发生。请注意,连字内部有多个光标位置。您可以通过在字母之间插入隐藏字符 ZWNJ(零宽度非连接符、u200C、HTML-
)来停止自动连字形成。Firefox 4 无需 CSS / SVG 的帮助即可形成连字。 MS Word 从 2010 版本开始可以进行连字,但需要在“高级”选项卡下启用,AbiWord(免费软件)也支持它。
查看此网站(使用 Firefox 或 Safari),该网站使用连字功能在音译文本之上显示复杂的脚本。
这种智能字体有 400 个奇怪的连字,即使在下载字体后,Firefox 和 Safari 也可以毫不费力地显示它们。
Ligature making is an optional feature in an OpenType font. Examples of ligatures are the glued together sets of letters like, fi, ff, fl, ffi, ffl. A common font that has ligatures is Calibri that came as the default font in Microsoft Office 2007.
The font has a lookup table that goes like this:
As you type the letters on the left hand side of the equation, the ligatures shown on right go and replace the currently displayed character (whether a single letter or an already formed ligature). Type 'difficult' inside Notepad using Calibri in some large size to see this happen. Notice that a ligature has multiple cursor positions inside it. You can stop automatic ligature formation by intervening the hidden character ZWNJ (Zero Width non-Joiner, u200C, HTML-
) between letters.Firefox 4 forms ligatures without the aid of CSS / SVG. MS Word can do ligatures starting from version 2010 but it needs to be enabled under Advanced tab, AbiWord (freeware) does also support it.
Check out this web site (use Firefox or Safari) that uses ligature feature to show a complex script on top of a transliterated text.
This smartfont has 400 odd ligatures that Firefox and Safari display without effort even after downloading the font.
一个具体的例子会很有帮助,因为这个问题非常不清楚。
我假设问题是您正在尝试访问不属于字体默认设置的连字功能(即必须将其作为 opentype 功能打开)。 CSS 不提供指定要激活的 opentype 功能的方法。对不起。
如果它是徽标或类似内容,您可以简单地将文本创建为图像,可以是 png 之类的格式,也可以是 SVG 格式。
对于短段落,SVG 可能也比较合适。
如果没有,那么也许有一种字体默认支持适当的连字。
A concrete example would be helpful, as this question is very unclear.
I assume that the issue is that you are attempting to access ligature features that are not part of the default for the font (i.e. it must be turned on as an opentype feature). CSS does not provide a way to specify opentype features to activate. Sorry.
If it is a logo, or similar, you could simply create the text as an image, either in something like png, or as an SVG.
For a short paragraph, SVG again might be suitable.
If not, then maybe there is a font that supports the appropriate ligature by default.
无法在 Firefox 中实现“多字连字”;它不支持跨词间空间的连字(或其他类型的 OpenType 规则,例如上下文替代)。
实际上,这是一个相当常见的限制;例如,XeTeX 也是如此。许多文本布局系统不会以与普通可打印字符相同的方式处理字间空格,因此 OpenType 查找不会按照您期望的方式匹配。
There's no way to make a "multi-word ligature" work in Firefox; it does not support ligatures (or other types of OpenType rule, such as contextual alternates) across inter-word spaces.
This is a fairly common limitation, actually; the same is true of XeTeX, for example. Inter-word spaces are not treated in the same way as normal printable characters by many text-layout systems, and so the OpenType lookups will not match in the way you expect.