Museo Sans numbers

Jos Buivenga's picture

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).


dezcom's picture

Jos, how does your fraction feature differ from the normal opentype feature code?


Jos Buivenga's picture

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.

dezcom's picture

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!


Jos Buivenga's picture

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 ;-)

Pieter van Rosmalen's picture

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.


Jos Buivenga's picture

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.

Bonobo's picture

Amazing. And beautiful. Can't wait ...

Friendelijke Groeten, Tom
(that was almost all Nederlands I know ;-) )

Jos Buivenga's picture

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

acnapyx's picture

@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

  • Define what is considered slash (as class);
  • Define already built fractions (like percent, onequarter, onehalf etc.);
  • Replace all standard figures with numerators;
  • Define replacement rules for the already built fractions;
  • Last part: generation of not-ready fractions (like 22/7 etc.)

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;

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).

Jos Buivenga's picture

Thank you Asparouh. I'll try it out soon.

Syndicate content Syndicate content