OpenType Fractions Not Using Precomposed Fractions

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Mon Sep 28, 2015 3:27 am

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
Fractions.png (19.91 KiB) Viewed 2431 times
Attachments
Balava Regular.otlfd
(80.27 KiB) Downloaded 87 times
Sukhumala Regular.otlfd
(76.07 KiB) Downloaded 83 times
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Erwin Denissen
Moderator
Moderator
Posts: 8319
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Erwin Denissen » Mon Sep 28, 2015 11:59 am

Can you please send the font projects too, as I'm not able to import the full script, as I get missing glyph issues.
Erwin Denissen
High-Logic
Proven Font Technology

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Mon Sep 28, 2015 12:21 pm

I attach the Sukhumala and Balava Regular projects. That should be enough to find the bug if there is one.
Attachments
Balava Sukhumala.7z
(394.31 KiB) Downloaded 77 times
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Erwin Denissen
Moderator
Moderator
Posts: 8319
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Erwin Denissen » Mon Sep 28, 2015 3:09 pm

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?
Attachments
Sukhumala Regular ED02.otf
(671.29 KiB) Downloaded 75 times
Erwin Denissen
High-Logic
Proven Font Technology

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Mon Sep 28, 2015 3:41 pm

Erwin Denissen wrote: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?
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.
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Erwin Denissen
Moderator
Moderator
Posts: 8319
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Erwin Denissen » Mon Sep 28, 2015 5:18 pm

Bhikkhu Pesala wrote:
Erwin Denissen wrote: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?
That's the version of FontCreator that I used. What do you mean by, “It doesn't match?”
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".
Bhikkhu Pesala wrote: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.
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?
Erwin Denissen
High-Logic
Proven Font Technology

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Mon Sep 28, 2015 5:57 pm

Erwin Denissen wrote: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".
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];
Erwin Denissen wrote: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 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 ?
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Mon Sep 28, 2015 6:01 pm

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?”
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Erwin Denissen
Moderator
Moderator
Posts: 8319
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Erwin Denissen » Tue Sep 29, 2015 9:10 am

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.
Erwin Denissen
High-Logic
Proven Font Technology

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8407
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Bhikkhu Pesala » Tue Sep 29, 2015 9:58 am

Erwin Denissen wrote: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
Fraction Feature.png (4.53 KiB) Viewed 2319 times
My other fonts like Pali Regular.otf all have friendly glyph names on export like a.subs zero.subs, etc.
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1903 build 18362.418

Erwin Denissen
Moderator
Moderator
Posts: 8319
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Fractions Not Using Precomposed Fractions

Post by Erwin Denissen » Tue Sep 29, 2015 10:56 am

Bhikkhu Pesala wrote:
Erwin Denissen wrote: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.
I know, I was just doing a test with all features disabled.
Bhikkhu Pesala wrote:My other fonts like Pali Regular.otf all have friendly glyph names on export like a.subs zero.subs, etc.
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.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply