3 ms·
There seems to be a lot of confusion around the use of the term "ligature" here. I, too, was a bit confused (especially since Kazuyuki lists corresponding HTML
by callahad 14y ago
There seems to be a lot of confusion around the use of the term "ligature" here. I, too, was a bit confused (especially since Kazuyuki lists corresponding HTML entities with each symbol). It turns out, his use is reasonable, and a bit clever:
1. What is a ligature? A ligature is a joining of two or more characters into a single character. A common one is "fi", which is often rendered with the dot of the i incorporated into the top of the f.
2. Why are they useful? Lots of folks find the aesthetically pleasing, but they have special import with movable type printing, in which characters are rendered in little rectangular slugs of lead. Since the lead slugs can't overlap, it's difficult to get just the right spacing between, say, an "f" and an "i" in a variable-width typeface. Thus, most fonts included specially cast ligatures, which were single slugs of lead containing multiple characters, like the "fi" mentioned above.
3. How do they work on computers? Lots of systems, including TeX, can look for sequences of letters like "fi" and replace them with a single ligature when rendered. Fonts can also embed this replacement table, which can be introspected and used by software when rendering text.
4. But how does this font use ligatures? So, it turns out that you don't have to limit yourself to things like "fi" and "ffl" -- you could embed a replacement table that matches any arbitrary sequence and replaces it with an arbitrary symbol. Lots of typefaces have "exotic" ligatures for things like "st" and "ct", and this typeface is no different. It defines a table of "ligatures" mapping sequences of letters like "file" into new symbols like that of a file icon.
So it uses existing ligature support (replacing sequences with symbols) in an unconventional but not unreasonable way.
5. Bonus: How does it do this without making a mess of Unicode? After all, there's no U+???? FILE SYMBOL code point! It turns out that Unicode actually demarcates a couple of codepoint ranges for "private use", explicitly saying that a font can put things in there that don't fit anywhere else. Kind of like private IP address ranges like 10.0.0.0/8 or 192.168.0.0/16. All of the replacement symbols are stored within the Unicode Basic Multilingual Plane's Private Use Area (U+E000 through U+F8FF), so they won't conflict with other, meaningful code points.
- jahewson 14y agoUsing the private use area in this font is absolutely the wrong thing to do. There's no need to use any Unicode points for the symbols, a font can have "ligatures" (actually these are "glyph substitutions", via the GSUB table) which map to (non-encoded) glyph indexes, rather than mapping to (encoded) Unicode points. So defining a Unicode point for a ligature symbol is completely unnecessary, as there is an additional level of indirection which you don't explain in point 5.