OpenType Fractions Not Using Precomposed Fractions

My Sukhumala Font doesn’t behave the same as my other fonts like Pali and Balava.

The Fractions feature is not substituting the precomposed fractions from Number Forms, and the numerators are higher than superscripts. I cannot spot any obvious errors in the OpenType script.
Fractions.png
Balava Regular.otlfd (80.3 KB)
Sukhumala Regular.otlfd (76.1 KB)

Can you please send the font projects too, as I’m not able to import the full script, as I get missing glyph issues.

I attach the Sukhumala and Balava Regular projects. That should be enough to find the bug if there is one.
Balava Sukhumala.7z (394 KB)

I need to look further into this, but I just wonder, the font you attached earlier doesn’t match the font I get when it is generated with FontCreator 9.0.0.1916.

Which version did you use?
Sukhumala Regular ED02.otf (671 KB)

That’s the version of FontCreator that I used. What do you mean by, “It doesn’t match?”

If I open your OTF, open the Font Test Window, and apply that test font to my Fractions Test in PagePlus, I still get the same misplaced numerators in the fractions.

The classes are not the same for your original “Denominators”. In the exported font, the class in named “CG_3” and now contains glyph named “uni0201”.

Yes, that is true. Is it how you actually defined the Superscript; in other words is the Fractions feature working, but you expect the text processing engine to use precomposed characters?

I don’t see uni0201. This is what I see, and the glyphs have different names to what is expected. I think that these glyphs should be named as the subscripts zero.subs … z.subs.

class @CG_3 [onequarter onehalf threequarters fraction onethird twothirds onefifth twofifths threefifths fourfifths onesixth fivesixths oneeighth threeeighths fiveeighths seveneighths zero.sups.1 one.2 two.2 three.2 four.sups.1 five.sups.1 six.sups.1 seven.sups.1 eight.sups.1 nine.sups.1 a.sups.1 b.sups.1 c.sups.1 d.sups.1 e.sups.1 f.sups.1 g.sups.1 h.sups.1 i.sups.1 j.sups.1 k.sups.1 l.sups.1 m.sups.1 n.sups.1 o.sups.1 p.sups.1 q.sups.1 r.sups.1 s.sups.1 t.sups.1 u.sups.1 v.sups.1 w.sups.1 x.sups.1 y.sups.1 z.sups.1];
class @CG_4 [zero.sups one.1 two.1 three.1 four.sups five.sups six.sups seven.sups eight.sups nine.sups a.sups b.sups c.sups d.sups e.sups f.sups g.sups h.sups i.sups j.sups k.sups l.sups m.sups n.sups o.sups p.sups q.sups r.sups s.sups t.sups u.sups v.sups w.sups x.sups y.sups z.sups];


I expect the precomposed fractions to be used where they are available, e.g. for 5/8 but not for other fractions like x/8.

I do seem to have designed the superscripts to be higher than the fraction slash, and higher than the numerators in the precomposed fractions. That is unusual. Possibly some “improvement” that was only have finished, or perhaps intentional so that superscripts are higher for footnotes, but lower for numerators to match the alpha superscripts.

I forget my exact reasons for the design decision — version 1.80 was updated on 18/6/2015. I wonder what will happen with improper fractions like 13/8 ?

The incorrect glyph names for the glyphs in Classes CG_3 etc., would explain why the fraction feature is not working as those glyphs should not exist in the font. In the project file these glyphs are named:

/zero.dnom/one.dnom/two.dnom/three.dnom/four.dnom/five.dnom/six.dnom/seven.dnom/eight.dnom/nine.dnom

The question is, “Is it a bug in my font or in FontCreator?”

I’m sure the unexpected glyph in that class was due to a bug in a beta of FontCreator.

On export FontCreator will generate glyph names as recommended by the specifications, so your “friendly” glyph names are then lost. I was thinking about adding another option for Glyph Names on export, so you can choose between:

  • No
  • Production (as recommended for distribution fonts)
  • Development (glyph names as specified in FontCreator)

Precomposed characters are more and more considered legacy as far as I know, just like the code points for ligatures such as ‘ffi’. With OpenType, the way is to add OpenType layout features. I’m not saying you should remove all legacy, but better make sure the OpenType layout features work as expected, as that is more important.

I’ve tried some tests with the fractions, but I can’t get them to magically work when I type the characters by hand. I tried it in Word 2007:

If I type “a” followed by a “grave” I do get the “à”, if I type “1”, “fraction” (code point $2044), and a “4” I just get 1⁄4.

You should be typing 1 slash 4.

The fraction feature is working fine in PagePlus — apart from the substitution of precomposed fractions.
Fraction Feature.png
My other fonts like Pali Regular.otf all have friendly glyph names on export like a.subs zero.subs, etc.

I know, I was just doing a test with all features disabled.

I see, so this still requires some attention from our side. Note, that this isn’t really important, as most software completely ignore glyph names.