Ligature quirks

Zero-width joiner and zero-width non-joiner

default optimizeLegibility
drittletzte

drittletzte

drittletzte

drittletzte

drittletzte

drit‌tletzte

drit‌tletzte

drit‌tletzte

drit‌tletzte

drit‌tletzte

drittlet‍zte

drittlet‍zte

drittlet‍zte

drittlet‍zte

drittlet‍zte

drit‌tlet‍zte

drit‌tlet‍zte

drit‌tlet‍zte

drit‌tlet‍zte

drit‌tlet‍zte

Notes:

  1. Internet Explorer 9 does not diſplay any ligatures until they are manually triggered by layout control characters (ZWNJ or ZWJ). Of courſe, this pretty much defies the very purpoſe ſmart ligatures. Ligatures may be called for by uſing a ZWJ. The following ſample will be diſplayed correctly in Internet Explorer 9:

    Sample Code
    beſ‍c‍hüt‍ze beſ‍c‍hüt‍ze

    Additionally, Internet Explorer 9 will ſometimes (when?) diſplay the rlig ligatures if they are followed ſoon (how ſoon?) by a layout control character (ZWNJ or ZWJ). I have been unable to find out how this works exactly.

  2. On Windows and Mac OS, Opera does not diſplay any ligatures until they are manually triggered by layout control characters (ZWNJ or ZWJ). Of courſe, this pretty much defies the very purpoſe ſmart ligatures. Ligatures may be called for by uſing a ZWJ. The following ſample will be diſplayed correctly in Opera:

    Sample Code
    beſ‍c‍hüt‍ze beſ‍c‍hüt‍ze

    Additionally, Opera will diſplay the ligatures in any word that has a layout control character (ZWNJ or ZWJ). When letterſpacing is increaſed, all ligatures are retained. This cannot be fixed with a ZWNJ, becauſe a ZWNJ will cauſe double letterſpace.

  3. Safari does not diſplay any ligatures unleſs two requirements are met: (a) There muſt be an additional CSS definition; (b) there muſt be no intervening non-printing characters. Since theſe two requirements may be ſet globally, they allow for a workaround. However, even if both requirements are met, ligature diſplay in text with increaſed letterſpacing is ſtill not correct.

    1. Safari requires the following additional non-ſtandard CSS definition:

      text-rendering: optimizeLegibility;

      Since this definition is non-ſtandard, your CSS will fail to validate when you uſe it.

      This is what the above browser test looks like if that additional CSS-Definition is included:

      OpenType
      beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
      AAT
      beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
      Graphite
      beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
      Reference image
      correct letterſpacing in Firefox: beſchütze/Zeit‌zone

      This yields better reſults in Safari. However, when letterſpacing is increaſed, the required ligatures are not diſtinguiſhed from the other ligatures; inſtead, either kind of ligatures is retained. This error can be ſeen in the following ſcreenſhot from Safari:

      faulty letterſpacing in Safari: beſchütze/Zeit‌zone
    2. Safari will fail to diſplay the ligatures if there are any non-printing characters ſuch as a ſoft hyphen or – ironcally! – a ZWJ., ſee the following two ſamples where Safari fails to diſplay the required ‹tz› ligature (in ſpite of text-rendering: optimizeLegibility):

      Sample Code
      Soft hyphen beſchüt­ze beſchüt­ze
      ZWJ beſchüt‍ze beſchüt‍ze
  4. Google Chrome will not diſplay any ligatures until three requirements are met: (a) There muſt be – like in Safari – an additional CSS definition; (b) there muſt be – like in Safari – no intervening non-printable characters; and (c) the font muſt be locally inſtalled. Of courſe, this pretty much defies the very purpoſe of font embedding. On Windows and Linux, there is at leaſt one additional requirement, but I have not been able to pin it down.

  5. In TextEdit, LibreOffice and Gimp, ligatures are diſplayed, but when letterſpacing is increaſed, the required ligatures are not diſtinguiſhed from the other ligatures; inſtead, either kind of ligatures is retained. Additionally, the ZWNJ cauſes double letterſpace when letterſpacing is increaſed. Both errors can be ſeen in the following incorrect ſcreenſhot (from TextEdit.app):

    faulty letterſpacing

    Compare that to a ſcreenſhot of the correct diſplay in Firefox:

    correct letterſpacing in Firefox
  6. For letterſpacing in XeLaTeX to work correctly, I uſe the packages fontspec and xspace to renew the command \emph ſo it produces text with increaſed letterſpacing:

    \usepackage{fontspec,xspace}
    \renewcommand\emshape{\xspace\addfontfeature{LetterSpace=20.0,WordSpace=1.5,Ligatures={NoCommon}}}

font-feature-settings

font-feature-settings default optimizeLegibility
(none)

drittletzte

drittletzte

drittletzte

drittletzte

"ccmp"

drittletzte

drittletzte

drittletzte

drittletzte

"ccmp" 0 drittletzte drittletzte
"liga"

drittletzte

drittletzte

drittletzte

drittletzte

"liga" 0 drittletzte drittletzte
"ccmp", "liga" drittletzte drittletzte
"ccmp" 0, "liga" 0 drittletzte drittletzte
"ccmp", "liga" 0 drittletzte drittletzte

The liga ligatures (‹tt›) should appear in normal text, but not in letter-spaced text. The ccmp ligatures (‹tz›) should always appear. Thus normal text should feature both kinds of ligatures (‹tt› and ‹tz›), while letter-spaced text should only feature the ccmp ligature (‹tz›). In a perfect world and in Firefox, this is the correct default behaviour.

The lines marked with gray background incorrect permutations permutations of the two kinds of ligatures. They are only included for comparison. The other lines are all supposed to look identically correct.

Note that the ‹tz› ligature, while encoded in ccmp, is encoded again in liga.

Additional browſer teſts

Different font formats

WOFF
beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
TTF
beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
EOT
beſchütze/Zeit‌zone – beſchütze/Zeit‌zone
SVG
beſchütze/Zeit‌zone – beſchütze/Zeit‌zone

Reference image (ſcreenſhot from Firefox 3.6.12 on Mac OS X):

reference screenshot: beſchütze/Zeit‌zone