简体   繁体   English

浏览器中的连字(开放式字体连字)问题

[英]problem with ligature (open type font ligature) in browsers

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. 我正在使用fontforge字体编辑器编辑字体一切都很好但是在结合时我想要多字结扎(它之间的空间)不适用于firefox和opera,它将使用word pad和记事本。

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. 注意:我使用@ font-face css语法导入字体,字体是ttf。

Ligature making is an optional feature in an OpenType font. Ligature制作是OpenType字体的可选功能。 Examples of ligatures are the glued together sets of letters like, fi, ff, fl, ffi, ffl. 连字的例子是粘合在一起的字母组,如fi,ff,fl,ffi,ffl。 A common font that has ligatures is Calibri that came as the default font in Microsoft Office 2007. 具有连字的常见字体是Calibri,它是Microsoft Office 2007中的默认字体。

The font has a lookup table that goes like this: 该字体有一个查找表,如下所示:

f i -> fi
f l -> fl
f f -> ff
ff i -> ffi
ff l -> ffl

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. 使用Calibri在一些大尺寸的记事本中键入“难度”以查看这种情况。 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- &#x200c ) between letters. 您可以通过在字母之间插入隐藏字符ZWNJ(零宽度非连接符,u200C,HTML &#x200c )来停止自动连接形成。

Firefox 4 forms ligatures without the aid of CSS / SVG. Firefox 4在没有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. MS Word可以从2010版开始执行连字,但需要在高级选项卡下启用,AbiWord(免费软件)也支持它。

Check out this web site (use Firefox or Safari) that uses ligature feature to show a complex script on top of a transliterated text. 查看此网站 (使用Firefox或Safari), 该网站使用连字功能在音译文本之上显示复杂的脚本。

This smartfont has 400 odd ligatures that Firefox and Safari display without effort even after downloading the font. 这个smartfont有400多个连字,Firefox和Safari即使在下载字体后也不费力地显示。

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 (ie it must be turned on as an opentype feature). 我假设问题是您正在尝试访问不属于字体默认值的连字特征(即必须将其作为opentype特征打开)。 CSS does not provide a way to specify opentype features to activate. CSS没有提供指定要激活的opentype功能的方法。 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. 如果它是徽标或类似徽标,您只需将文本创建为图像,可以是png,也可以是SVG。

For a short paragraph, SVG again might be suitable. 对于一个简短的段落,SVG可能也适合。

If not, then maybe there is a font that supports the appropriate ligature by default. 如果没有,则默认情况下可能存在支持适当连接的字体。

There's no way to make a "multi-word ligature" work in Firefox; 在Firefox中无法使“多字结扎”工作; it does not support ligatures (or other types of OpenType rule, such as contextual alternates) across inter-word spaces. 它不支持跨字间隔的连字(或其他类型的OpenType规则,例如上下文替换)。

This is a fairly common limitation, actually; 实际上,这是一个相当普遍的限制; the same is true of XeTeX, for example. 例如,XeTeX也是如此。 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. 对于许多文本布局系统,字间空间的处理方式与普通可打印字符的处理方式不同,因此OpenType查找将与您期望的方式不匹配。

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

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