-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\sfrac does not use OpenType fractions #3
Comments
Are OpenType fractions actually reliable? It’s been years since I did any testing but I remember poor results.
Perhaps more reliable would be for xfrac to have an OpenType mode added that looks for numerator and denominator glyphs and uses them. (Kind of like the realscripts package does for footnote symbols and so on.)
|
Some fonts attempt to add extra context detection to allow the option to be used globally, and that can get messy, though that's not really a problem here. I think the font is also responsible for converting a slash into a solidus, and things could theoretically go wrong there. But with a good font, you get a perfectly kerned fraction without additional work. |
Ah, evidently many fonts have trouble with more complex fractions. |
BTW, with XeTeX |
Very cool – though, alas, that does not seem to work with LuaLaTeX. It does seem as if @wspr's approach would be the most reliable way of having fractions that just work. |
@khaledhosny Thanks for this insight into HarfBuzz, and of course the anticipated luahbtex! |
This particular behavior of HarfBuzz is not configurable; it follows the Unicode recommendation for handling fraction slash (U+2044). You can avoid the automatic fractions by not using fraction slash (regular slash does not activate this), and you can manually activate |
The
xfrac
package does not provide any means of using OpenType fractions where these are available. Would it be possible to add an option that turns on\addfontfeature{Fractions=On}
through fontspec?Here's an example based on a StackExchange discussion:
The text was updated successfully, but these errors were encountered: