Hossein
Hossein

Reputation: 31

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.

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.

Upvotes: 3

Views: 2062

Answers (3)

Naena
Naena

Reputation: 21

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:

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. 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.

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.

Upvotes: 2

Jonathan
Jonathan

Reputation: 69

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.

Upvotes: 0

Marcin
Marcin

Reputation: 49856

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.

Upvotes: 0

Related Questions