Museo Sans numbers
After reading Tal Leming's fraction fever I decided to give this a go. I've long wanted to script a decent fraction feature, but couldn't get it right. This is working perfectly (for now ... I've only tested it in Indesign CS2 on Tiger).

Still in progress ... but Museo Sans will end up with nominators, denominators, superiors, inferiors, oldstyle figures (proportional & tabular) and lining figures (proportional & tabular).



- Jos Buivenga's blog
- Login or register to post comments




7.Jul.2008 7.03am
Jos, how does your fraction feature differ from the normal opentype feature code?
ChrisL
7.Jul.2008 7.07am
Chris, I don't know what the normal or standard OT feature code for fractions is. Some time ago I tried to get it working and took a look at a few Adobe Pro fonts, but I really couldn't figure out how they scripted it.
7.Jul.2008 7.12am
Jos,
I just now followed your link to Tal's page. His way is way smart for the enduser but adds a Tad more work for the type desighner :-)
It is really cool that someone doing a cookbook can, in less time than it takes to flip an egg, impose the frac feature with the aid of a stylesheet! Goitta love Tal's work. That is one Leming I would surely follow!
ChrisL
7.Jul.2008 7.28am
It's beautiful and it works like a charm. I'm curious though how other people script the frac feature.
That is one Leming I would surely follow!
Just laughed my head off. Tal may be smart in programming solutions but there's no one smarter in commenting ;-)
7.Jul.2008 7.53am
What I don’t like about the frac feature like this is that the space will be removed. I think it’s the designer who decides how the fractions must look like, not the typeface. I mean with or without the space in front of the fraction.
Pieter
7.Jul.2008 8.10am
True and a good point, but the feature is off by default and can also be applied on a selection if you want (you don't need the space) so the designer stays in control.
7.Jul.2008 12.47pm
Amazing. And beautiful. Can't wait ...
Friendelijke Groeten, Tom
(that was almost all Nederlands I know ;-) )
7.Jul.2008 1.52pm
Thanks. Glyphs are not final yet. Still got lots to change, but I'm glad to share the joy I had with this frac thing.
Yes, Dutch does mingle best with English and will still read as Dutch :-)
Viele Grüße von Arnheim
7.Jul.2008 3.59pm
@Jos: "I don’t know what the normal or standard OT feature code for fractions is"
Quite simplified, this is the way I do fractions (follows the description, then the code itself). Derived of Adobe standards, of course. This is a working code I only re-edit to alter the exact figures naming. Depending on the availability of five sixths, four fifths and other [more exotic] fractions you can remove parts of the replacement code below.
So, the explanation.
Requirements: 0-9.numerators, 0-9.denominators
feature frac {
@slash = [slash fraction];
@prebuilt = [perthousand percent onequarter onehalf threequarters oneeighth threeeighths fiveeighths];
lookup FRAC {
sub [zero zero.pnum] by zero.numr;
sub [one one.pnum onesuperior] by one.numr;
sub [two two.pnum twosuperior] by two.numr;
sub [three three.pnum threesuperior] by three.numr;
sub [four four.pnum foursuperior] by four.numr;
sub [five five.pnum fivesuperior] by five.numr;
sub [six six.pnum sixsuperior] by six.numr;
sub [seven seven.pnum sevensuperior] by seven.numr;
sub [eight eight.pnum eightsuperior] by eight.numr;
sub [nine nine.pnum ninesuperior] by nine.numr;
} FRAC;
sub zero.numr' @slash' zero.numr' zero.numr' zero.numr' by pertenthousand;
sub zero.numr' @slash' zero.numr' zero.numr' by perthousand;
sub zero.numr' @slash' zero.numr' by percent;
sub one.numr' @slash' four.numr' by onequarter;
sub one.numr' @slash' two.numr' by onehalf;
sub three.numr' @slash' four.numr' by threequarters;
sub one.numr' @slash' eight.numr' by oneeighth;
sub three.numr' @slash' eight.numr' by threeeighths;
sub five.numr' @slash' eight.numr' by fiveeighths;
sub seven.numr' @slash' eight.numr' by seveneighths;
sub one.numr' @slash' three.numr' by onethird;
sub two.numr' @slash' three.numr' by twothirds;
sub one.numr' @slash' five.numr' by onefifth;
sub two.numr' @slash' five.numr' by twofifths;
sub three.numr' @slash' five.numr' by threefifths;
sub four.numr' @slash' five.numr' by fourfifths;
sub one.numr' @slash' six.numr' by onesixth;
sub five.numr' @slash' six.numr' by fivesixths;
sub [@slash @fig_dnom @prebuilt] @fig_numr' by @fig_dnom;
} frac;
The beautiful part is it does not need in fact any editing (you can copy and paste this feature code everywhere, if you have defined the classes @fig_dnom [denominators] and @fig_numr [numerators]). Of course Tal's solution is nicer, but this one is easier - and does not have above-mentioned shortcomings (namely, the space problem).
8.Jul.2008 12.41am
Thank you Asparouh. I'll try it out soon.