OpenType Features: Order of Precedence

Post general font related questions (e.g. how to install, convert and use fonts) and requests (looking for fonts, designers etc.) here.
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Re: OpenType Features: Order of Precedence

Post by MikeW »

Oops. And the frac feature is...complicated.

There are 13 chaining contexts. I believe I based it upon Tal Leming's Fraction Fever code. So while not an infinite arbitrary fraction feature, I doubt people will be using more than it can handle.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

MikeW wrote:Cannot share the font project.

If needed, I can create a sample in some OFL font.
You're welcome to try with my Mandala font.

Fractions and Ordinals both use a chaining context.
Chaining Contexts.png
Chaining Contexts.png (5.58 KiB) Viewed 13018 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

MikeW wrote:Oops. And the frac feature is...complicated.

There are 13 chaining contexts. I believe I based it upon Tal Leming's Fraction Fever code. So while not an infinite arbitrary fraction feature, I doubt people will be using more than it can handle.
I found this thread on TypeDrawers, which refers to Tal Leming's Fraction Fever code.

I suspect that fractions with more than 5 or so numerators or denominators are unlikely.

I can imagine that someone might need fractions like (123+75)/(123-56), which is already eight numerators/denominators, but ten would surely be adequate for most users. However, my much simpler code works without any limits. The only problem is that it breaks the Ordinals feature.

I think I have found a much simpler method by adding a lookup to Ordinals for NumeratorsToNumbers. Take a look at my FontCreator 11.0 project file and see if it breaks something else.
Ordinals Feature.png
Ordinals Feature.png (60.93 KiB) Viewed 12954 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Features: Order of Precedence

Post by Erwin Denissen »

It looks promising, but (123/345) doesn't seem to work correctly if ordn is active as well.
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

Erwin Denissen wrote:It looks promising, but (123/345) doesn't seem to work correctly if ordn is active as well.
Yes. Still some issues to resolve. I updated it again, but 123/456 is currently still broken.

This is the latest version.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
PJMiller
Top Typographer
Top Typographer
Posts: 976
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: OpenType Features: Order of Precedence

Post by PJMiller »

Ordinals and Fractions don't play nicely together but one must remember that for any given section of text the user of the font is only ever likely to enable ordinals or fractions, they are probably not going to enable both at once.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

If I use Ordinals, I will enable it as part of the Body Text paragraph style. This is the only practical method. Highlighting every occurrence of st, nd, rd, or th to enable the Ordinals feature makes it pointless adding the feature in the first place. One may as well just use Superscripts.

If the Ordinals feature is enabled, therefore, whenever one wants to use the fractions feature, it would be nice if one did not have to disable the Ordinals feature first.

It is not a big problem, which is why I have not bothered to seek a solution before, but it would be better to avoid the conflict. It clearly can be done, but the solution of 13 contextual substitutions is too complex for novice users to figure out or do without help. I would love to find a simpler solution.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
PJMiller
Top Typographer
Top Typographer
Posts: 976
Joined: Tue Jun 16, 2015 8:12 pm
Location: Sheffield, South Yorkshire
Contact:

Re: OpenType Features: Order of Precedence

Post by PJMiller »

It would indeed be good if they could play nicely together.
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Features: Order of Precedence

Post by Erwin Denissen »

I'm sure we can get both to work for the basics, but what about more complex formulas, or even just something like:

1st = 2x + 1/3y - (34/456)z and 2nd = 0
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

Erwin Denissen wrote:I'm sure we can get both to work for the basics, but what about more complex formulas, or even just something like:

1st = 2x + 1/3y - (34/456)z and 2nd = 0
If one writes (2x+1)/3y-(34+456) it can work, but I don't think the slash can be used twice, even if one adds a subscripted slash to the font. The space could probably be dealt with, but it might need a smaller value for superscripts and subscripts, so it's best to expect users to type formulae without extra spaces.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
MikeW
Posts: 625
Joined: Mon May 20, 2013 2:51 pm

Re: OpenType Features: Order of Precedence

Post by MikeW »

Erwin Denissen wrote:I'm sure we can get both to work for the basics, but what about more complex formulas, or even just something like:

1st = 2x + 1/3y - (34/456)z and 2nd = 0
capture-001132.png
But then, I don't know how you would have wanted it formatted...which is why for the (very) few journals I have done have at least drawings, or more likely have used MathType in Word, which I also used for generating the EPS files for ID and QXP--I just need to (1) export them ad hoc from MT in Word, and (2) make sure when laying it out that the EPS files really were like "the picture."
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Features: Order of Precedence

Post by Erwin Denissen »

If you write this with Equation Editor in Microsoft Word

1st = 2x + 1/3y - (34/456)z and 2nd = 0 or 4x^3

It looks like :
equationeditor.png
equationeditor.png (1.53 KiB) Viewed 12904 times
So I think ultimately OpenType features should make it look like:
equationopentype.png
equationopentype.png (9.19 KiB) Viewed 12904 times
On the other hand, the Fractions feature is only meant for fractions, not for exponents, so the last part (4x^3) is out of scope.
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

I think we're getting way too ambitious here.

I don't think we need 13 chaining contexts, or an equation editor.

A fraction feature that can cope with 123/456 or (1+2)/(abc-xyz) without conflicting with Ordinals would already be quite impressive.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: OpenType Features: Order of Precedence

Post by Erwin Denissen »

Bhikkhu Pesala wrote:I think we're getting way too ambitious here.

I don't think we need 13 chaining contexts, or an equation editor.

A fraction feature that can cope with 123/456 or (1+2)/(abc-xyz) without conflicting with Ordinals would already be quite impressive.
Fair enough, but I'm still wondering what to do with this:
1st = 2x + 1/3y

Typically OT features such as fractions and ordinals are manually applied to the run of text or automated process to do so.
It looks like MikeW is right, or at least that statement would make it a lot easier for us.
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: OpenType Features: Order of Precedence

Post by Bhikkhu Pesala »

I think, if only fractions are enabled it should do this:
Frac.png
Frac.png (10.2 KiB) Viewed 12892 times
If both fractions and ordinals are enabled it should probably do this:
Frac + Ordn.png
Frac + Ordn.png (10.02 KiB) Viewed 12892 times
Or perhaps this, but I think that not all of a-z should be included in Ordinals, though that's a moot point:
Frac + Ordn 2.png
Frac + Ordn 2.png (9.67 KiB) Viewed 12892 times
I am still trying to understand what Mike means by "a run of text." Is it this:
Wikipedia wrote:FC Version 11.0 was released on 10th May 2017. It added support for cubic Bézier curves, Vertical font metrics, High Resolution monitors with new icons in a range of sizes from 24-48 pixels, and a 64-bit version.
Or, just this:
10th May 2017
Or is it the entire Wikipedia article?

I don't think it should be making it easier for the Font Designer. The Font Designer's job is to make it easier for the users.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply