It seems to work perfectly except that the space is not being replaced by my thin space glyph. E.g. in Indesign or Illustrator, I type ‘3 1/2’, select it and apply the fractions opentype feature. The fraction is created, but there is still a standard space rather than a thin space between the 3 and the fraction.
I had a look and it actually works fine in AI The difference between your space and thinspace is not very much, so one would not notice the difference at first. So I put a little dot in the thinspace in order to see which one it was, and it was just fine:
So I changed the name in the font info, exported it, deleted the previously named files from my Adobe font folder and rebooted my MacBook and it still hasn’t fixed it.
Seems I must have overlooked something really simple. Am I making a fundamental error in Illustrator when using the opentype fractions feature? To clarify, I type: 3 [space] 1 / 2 then select it all and hit ‘Fractions’ in the OpenType panel. Figure and Position are set to default.
What version of Illustrator do you have? And can you try Indesign? Illustrator sometimes doesn’t reload the fonts correctly and is a bit picky with OpenType.
For some reason now I have this problen in InDesign CC, where I select everything, apply the Fractions feature and get ³ ¾ instead of 3 ¾ … frac feature is auto generated in Glyphs.
That is expected behaviour for the default code. If you want a smarter code that tries to detect standalone figures, see Tal Leming’s ‘Fraction Fever’: