I am using two fonts, STSong and STHeiti. I want to know if these fonts support ligatures, such as
ibecoming one character, or at least having two characters nearby.
- I made a ConTeXt document, but some words, such as “off” and “fish” are appearing like “of f” and “f ish”. It is possible that my code is in error though.
- I also tried viewing the fonts in OpenOffice.org, but this seems an unreliable way to check, because OpenOffice.org seems to use font-substitution whenever I type a Unicode character with a font that does not contain that character.
Is there a way to determine if these fonts contain ligatures?
For ligatures to be supported in an OpenType font, two things need to be there: the actual ligature glyphs (which you can check by scrolling through the glyph table with a symbol picker etc.) and a glyph substitution table that tells software to replace a sequence of characters by a ligature.
There’s a handy piece of software called DTL OTMaster Light (free, runs on Windows, Mac, Linux) that allows you to look at these things. Open the font file, then in the Tools menu, find the GPOS/GSUB table viewer. For “Layout Table” choose GSUB (GPOS is for kerning), for “Feature” pick “Standard Ligatures.” In a font like e.g. Minion, there’ll be a lot to see there!
Things to learn on the way: which ligatures are available in OpenType may depend on 1. the script (latin, cyrillic, etc.) 2. the language, 3. what “features” are selected, i.e. only standard ones, or all manner of fancy ligatures, and 4. the same glyph substitution mechanism is used in some fonts to replace standard digits by old-style, lower case by small caps, etc.
Oh: if your font has fi and fl, but no GSUB table, you can use a tool like FontForge to add them. Has a really weird user interface but lots of documentation online, so you’ll survive.