Typophile

Help with OpenType fractions

Deus Lux

If I generate an OTF font, and I have a glyph created for onehalf, will "1 slash 2" automatically be replaced by onehalf, or do I need to build a feature for it?

Tried building a feature, but an "aborting because of errors" error:


feature frac {
lookup frac1 {
sub one slash 2 by onehalf;
} frac1;
lookup frac1;
} frac;

Also, what is the easiest way to code for all "(number) slash (number)" to change into nut fractions? I'd like this to work up into the thousands (333/1028 for example). Creating a "sub" line of code for every possible fraction is obviously impractical.

wow. thanks, janek!

You might want to take a look at this: http://opentypecookbook.com

It was launched recently by Tal Leming. He covers both the languagesystems thing and fractions (although not nut fractions).

Captured from web.archive.org on 11 Nov 2014. view this capture