Dear Typophiles,
is it possible to have two types of fraction (slashed and nuts) in the same font? I have the slashed ones implented via frac-feature in opentype, so I can have fractions like 2323423/34575685 or 15/4. This works fine in Indesign CS2 already.
How do I implement additional nut fractions? Is it possible via Opentype, and if yes, what is best practice?
Thanks for your help
Sebastian
Here is the code I used for slashed fractions (I think I got it from here, because I can't imagine that I invented this on my own...)
feature frac {
lookup FRAC {
sub [zero zero.onum zero.superior zero.subscript zero.denominator] by zero.numerator;
sub [one one.onum onesuperior one.subscript one.denominator] by one.numerator;
sub [two two.onum twosuperior two.subscript two.denominator] by two.numerator;
sub [three three.onum threesuperior three.subscript three.denominator] by three.numerator;
sub [four four.onum four.superior four.subscript four.denominator] by four.numerator;
sub [five five.onum five.superior five.subscript five.denominator] by five.numerator;
sub [six six.onum six.superior six.subscript six.denominator] by six.numerator;
sub [seven seven.onum seven.superior seven.subscript seven.denominator] by seven.numerator;
sub [eight eight.onum eight.superior eight.subscript eight.denominator] by eight.numerator;
sub [nine nine.onum nine.superior nine.subscript nine.denominator] by nine.numerator;
} FRAC;
sub zero.numerator' slash' zero.numerator' zero.numerator' by perthousand;
sub zero.numerator' slash' zero.numerator' by percent;
sub one.numerator' slash' two.numerator' by onehalf;
sub one.numerator' slash' three.numerator' by onethird;
sub two.numerator' slash' three.numerator' by twothirds;
sub one.numerator' slash' four.numerator' by onequarter;
sub three.numerator' slash' four.numerator' by threequarters;
sub one.numerator' slash' five.numerator' by onefifth;
sub two.numerator' slash' five.numerator' by twofifths;
sub three.numerator' slash' five.numerator' by threefifths;
sub four.numerator' slash' five.numerator' by fourfifths;
sub one.numerator' slash' six.numerator' by onesixth;
sub five.numerator' slash' six.numerator' by fivesixths;
sub one.numerator' slash' eight.numerator' by oneeighth;
sub three.numerator' slash' eight.numerator' by threeeighths;
sub five.numerator' slash' eight.numerator' by fiveeighths;
sub seven.numerator' slash' eight.numerator' by seveneighths;
sub [slash @FIG_DNOM @FIG_FRAC] @FIG_NUM' by @FIG_DNOM;
sub [slash] by fraction;
} frac;
