- Yes, the fontspec package supports them.
- No, there isn't typically a good way to find out where they are.
- If you don't care if your source code is portable (i.e., you don't care if it breaks when you update your fonts or move to a different computer with a different version of the same font), the easiest way to get at them is with \XeTeXglyph. To get a list of which values correspond to which glyphs, use a loop:
You can use trial and error to find how many glyphs are in your font, though some programs will just straight-up tell you.
\newcount\charcount \charcount=0 \loop \number\charcount --- \XeTeXglyph\charcount \par \ifnum\charcount<1415 % My copy of Poetica Std has 1415 glyphs \advance\charcount1 \repeat
- If you need your code to be portable, do not use \XeTeXglyph. The ligatures should be available through \fontspec[Alternate=X,Variant=Y] for certain values of X and Y. You can run opentype-info.tex (or aat-info.tex or whatever, depending on the font format) to find the maximum number of variants. I'm not aware of a way to find the maximum number of alternates installed.
- If variants 1 and 2 aren't useful, don't give up on the rest! In Zapfino, for instance, \fontspec[Alternate=1,Variant=3] of the 'fl' ligature is different from variants 0 through 2, even though 0 through 2 are all identical in alternate 1. As far as I can tell, finding the right variant number is a trial-and-error process.
- If you can't find the ligatures using the whole ligature itself, try using just the first letter and using higher values for X and Y. In Poetica Std, the 'ft' ligature glyphs can be accessed as alternative forms of just the 'f', with no 't' after it. I suspect this is a mistake in the font specification, but that's life.
- Alternative glyphs, even for individual letters, cannot be transformed back into ASCII. This means it's gorgeous when you view it, but if you want a computer to process it (say, to read it aloud to a blind person who can't see the beautiful typography but still wants to know what it says), you're SOL. If you need to worry about accessibility issues, don't use alternates or variants of any kind!