wspr / realscripts

LaTeX package for accessing OpenType subscripts and superscripts
3 stars 0 forks source link

Tweak for addliga #7

Open dbenjaminmiller opened 5 years ago

dbenjaminmiller commented 5 years ago

I created the small addliga package on CTAN, which adds ligatures to legacy TrueType fonts. I'm working on a new version to support inferior and superior figures as well. I do this by using fonts.handlers.otf.addfeature. This "just works" when it comes to an added liga, but for some reason the sups feature is only accessible by its raw name, and not by VerticalPosition. Changing realscripts to use RawFeature=+sups for OpenType fonts instead of VerticalPosition fixes this. I know it's a bit of a hack, though... but it seems like the easiest way to make things work.

wspr commented 5 years ago

This sounds like an underlying bug in the way fontspec and/or luaotfload query if a font feature is available...

dbenjaminmiller commented 5 years ago

It definitely is. I suppose once I have time I will trawl the sources of those respective projects and try to figure out how to fix this....

Perhaps another suggestion could be the arbitrary assignment of super/sub to a specific OpenType feature. This would allow somebody who prefers sinf to subs, for example, to choose this, and would also alleviate my problem (in practice).