Discretionary ligatures on modern browsers
Or any kind of typographical features: it’s a mess. When designing a website, type is something I really want to control.
Modern browsers (i.e. Chrome 25(!), Opera 12, Firefox 13, Safari 6) can certainly use advanced typographical features, but the reason they approach its coding from so many different versions of the same code is a war CSS3 already knows. As HTML5 solidifies, it leaves its vendor prefixes and other post-battle debris behind, the standard CSS Font module is already official and a huge player is introduced to solve type problems: Opentype.
But what can we do about ligatures? who is there to guarantee aesthetic consistency? should the developers be concerned, or are the browsers to blame?
Surely, we can create ligatures replacing each instance of ‘ff’ for its unicode U+FB00 like Wyatt Allen’s old Ligature.js, but it comes as a short-sighted solution as not all fonts are created equal. This doesn’t leave room for wild typographer’s desires, such as non-sandard ligatures like ‘ip’ or ‘gi’ because the display is limited by the file containing the ligatures.
Besides, since ‘fi’ has been replaced by some weird unicode character, copy & pasting and especially accesibility tools such as Text to Speech may not know that coffee is pronounced ‘coffee’.
Get Jesús Robles’s stories in your inbox
Join Medium for free to get updates from this writer.
This must be addressed by the browser, Chrome knows it, it uses Opentype features to talk to its font engine and enable each feature inside the current font. And it’s quite easy, you just add
font-feature-settings: "liga""dlig"
to your CSS. This enables common and discretionary ligatures on any text. If you want to enable it on IE10, you have to add the -ms- vendor prefix, this applies to every other browser.
And Safari? Surely Apple —the crossection between technology and liberal arts— must be the pioneer on typographical features.
And yet, here we are, notice that only the common ligatures are there, but they only appear because we had to apply another non-standard rule:
text-rendering: optimizeLegibility;
Still think it’s not a mess? optimizeLegiblility messes up Chrome and displays blank blocks and disables the font native kerning when mixed with font-variant: small-caps; talking about small caps, they can be enabled on every browser but can’t be turned off it they’re embedded in the font; discretionary ligatures don’t work on Safari but the browser doesn’t report it; font-variant-ligatures works on Firefox, IE10 and Chrome but doesn’t work on Safari unless it gets the vendor prefix -webkit (which Chrome that’s also webkit doesn’t mind). There is a plethora of bugs and inconsistencies across browsers supporting, half-supporting or ignoring Opentype.
Ligatures are more of a guilty pleasure than a neccesity, they’re not essential, but they’re pretty. We can wait 6 months for Opentype adoption, and in the meantime, learn to appreciate type by its basic essence and not by its exotic tricks.
By the way, I couln’t get the title to render equally on every browser, so I just used Photoshop to do it.










