OpenType Fractions Not Using Precomposed Fractions
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
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.
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.
- Attachments
-
- Balava Regular.otlfd
- (80.27 KiB) Downloaded 243 times
-
- Sukhumala Regular.otlfd
- (76.07 KiB) Downloaded 226 times
-
- Moderator
- Posts: 11157
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
Can you please send the font projects too, as I'm not able to import the full script, as I get missing glyph issues.
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
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 225 times
-
- Moderator
- Posts: 11157
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
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?
Which version did you use?
- Attachments
-
- Sukhumala Regular ED02.otf
- (671.29 KiB) Downloaded 223 times
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
That's the version of FontCreator that I used. What do you mean by, “It doesn't match?”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?
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.
-
- Moderator
- Posts: 11157
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: OpenType Fractions Not Using Precomposed 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".Bhikkhu Pesala wrote:That's the version of FontCreator that I used. What do you mean by, “It doesn't match?”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?
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?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.
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
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.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".
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.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 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 ?
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
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:
The question is, “Is it a bug in my font or in FontCreator?”/zero.dnom/one.dnom/two.dnom/three.dnom/four.dnom/five.dnom/six.dnom/seven.dnom/eight.dnom/nine.dnom
-
- Moderator
- Posts: 11157
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
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.
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.
-
- Top Typographer
- Posts: 9877
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
You should be typing 1 slash 4.Erwin Denissen wrote:If I type "1", "fraction" (code point $2044), and a "4" I just get 1⁄4.
The fraction feature is working fine in PagePlus — apart from the substitution of precomposed fractions.
My other fonts like Pali Regular.otf all have friendly glyph names on export like a.subs zero.subs, etc.
-
- Moderator
- Posts: 11157
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: OpenType Fractions Not Using Precomposed Fractions
I know, I was just doing a test with all features disabled.Bhikkhu Pesala wrote:You should be typing 1 slash 4.Erwin Denissen wrote:If I type "1", "fraction" (code point $2044), and a "4" I just get 1⁄4.
The fraction feature is working fine in PagePlus — apart from the substitution of precomposed fractions.
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.Bhikkhu Pesala wrote:My other fonts like Pali Regular.otf all have friendly glyph names on export like a.subs zero.subs, etc.