# OpenType Features: Order of Precedence

**URL:** <https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575>\
**Category:** General Font Discussions\
**Created:** [December 10, 2012, 10:25am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575 "2012-12-10T10:25:40Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![PJMiller](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/p/f17d59/32.png) [@PJMiller](https://forum.high-logic.com/u/PJMiller)\
**Post date:** [May 28, 2017, 11:35am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/21 "2017-05-28T11:35:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 28, 2017, 11:45am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/22 "2017-05-28T11:45:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![PJMiller](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/p/f17d59/32.png) [@PJMiller](https://forum.high-logic.com/u/PJMiller)\
**Post date:** [May 28, 2017, 1:04pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/23 "2017-05-28T13:04:04Z")

</div>

It would indeed be good if they could play nicely together.

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 28, 2017, 8:07pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/24 "2017-05-28T20:07:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 28, 2017, 8:28pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/25 "2017-05-28T20:28:35Z")

</div>

> [@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

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.

---

<div class="post-metadata">

**Author:** ![MikeW](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@MikeW](https://forum.high-logic.com/u/MikeW)\
**Post date:** [May 28, 2017, 11:01pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/26 "2017-05-28T23:01:01Z")

</div>

> [@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

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.”

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 29, 2017, 9:24am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/27 "2017-05-29T09:24:25Z")

</div>

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](https://forum.high-logic.com/uploads/default/original/2X/f/f1a1c06702fb46b15be81cee84603de56fe1138f.png)  
So I think ultimately OpenType features should make it look like:  
 ![equationopentype.png](https://forum.high-logic.com/uploads/default/original/2X/9/96f488a32f4485dfc01075d5c29a9a3c783b4665.png)  
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.

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 29, 2017, 10:50am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/28 "2017-05-29T10:50:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 29, 2017, 10:57am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/29 "2017-05-29T10:57:04Z")

</div>

> [@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.

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.](https://forum.high-logic.com/t/chaining-context-ligatures-following-numerals/5733/1)  
It looks like MikeW is right, or at least that statement would make it a lot easier for us.

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 29, 2017, 11:06am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/30 "2017-05-29T11:06:42Z")

</div>

I think, if only fractions are enabled it should do this:  
 ![Frac.png](https://forum.high-logic.com/uploads/default/original/2X/9/922cb82ad12ca1e9ef6b2f362714f488db410b2a.png)  
If both fractions and ordinals are enabled it should probably do this:  
 ![Frac + Ordn.png](https://forum.high-logic.com/uploads/default/original/2X/f/f7abbd68286adf746f93afb50d5ef0b10de560e1.png)  
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](https://forum.high-logic.com/uploads/default/original/2X/5/55900270c6a92f0c4a3ed4f5a0d50e726c6d8426.png)  
I am still trying to understand what Mike means by “a run of text.” Is it this:

> [@Wikipedia](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 29, 2017, 11:27am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/31 "2017-05-29T11:27:47Z")

</div>

> [@Bhikkhu Pesala](#):
>
> I am still trying to understand what Mike means by “a run of text.”

OpenType layout features are processed per “run of text”. This means text is divided into smaller segments. Each new line will cause such split, but also a switch between Scripts, e.g. if Latin and Hebrew text is mixed, they will be split into separate segments. That is why kerning pairs between different scripts will never work.

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 29, 2017, 11:44am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/32 "2017-05-29T11:44:59Z")

</div>

Would this work if both frac and ordn are activated:

 ![fraction.png](https://forum.high-logic.com/uploads/default/original/2X/1/1556f8ba5efe3f8a5e086e2535fbba9b24fe51da.png)

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 29, 2017, 11:54am UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/33 "2017-05-29T11:54:14Z")

</div>

> [@Erwin Denissen](#):
>
> Would this work if both frac and ordn are activated:

That looks fine to me. However, I am not too sure if the superscripted x in 2x would be expected.

As far as I know, only d, h, n, r, s, t, è and ú are valid for [ordinal numbers](https://en.wikipedia.org/wiki/Ordinal_indicator), but there may be others in other languages.

Abbreviations like Mlle for Mademoiselle are not Ordinals.

I think that Spanish ordinals ­­ªº are Latin-1 Supplement glyphs, and should not use ordinals either.

---

<div class="post-metadata">

**Author:** ![Alfred](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@Alfred](https://forum.high-logic.com/u/Alfred)\
**Post date:** [May 29, 2017, 1:50pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/34 "2017-05-29T13:50:30Z")

</div>

> [@Bhikkhu Pesala](#):
>
> That looks fine to me. However, I am not too sure if the superscripted x in 2x would be expected.

I am sure that the superscripted x in 2x would not be expected. In normal mathematical notation, 2x means “2 times x” but 2 followed by a superscript x means “2 to the power x” (i.e. 2 multiplied by itself x times).

> [@Bhikkhu Pesala](#):
>
> I think that Spanish ordinals ­­ªº are Latin-1 Supplement glyphs, and should not use ordinals either.

I think the same.

---

<div class="post-metadata">

**Author:** ![MikeW](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@MikeW](https://forum.high-logic.com/u/MikeW)\
**Post date:** [May 29, 2017, 1:58pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/35 "2017-05-29T13:58:57Z")

</div>

> [@Alfred](#):
>
> …  
> I am sure that the superscripted x in 2x would not be expected. In normal mathematical notation, 2x means “2 times x” but 2 followed by a superscript x means “2 to the power x” (i.e. 2 multiplied by itself x times).

In setting math equations without the benefit of MathType or one of the other equation editors (I rarely got Word’s equations), the /x would have not been next to the 2 if it had been meant for a multiplication operator. If there is no space type it is meant as a “power of” operator.

Setting equations is by far the most laborious of any layout work. It gets checked, double & triple checked throughout the editing process by multiple parties. Even so, there is almost always a mistake (well, more than one) somewhere in a book.

---

<div class="post-metadata">

**Author:** ![Bhikkhu\_Pesala](https://forum.high-logic.com/user_avatar/forum.high-logic.com/bhikkhu_pesala/32/9411_2.png) [@Bhikkhu\_Pesala](https://forum.high-logic.com/u/Bhikkhu_Pesala)\
**Post date:** [May 29, 2017, 6:21pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/36 "2017-05-29T18:21:40Z")

</div>

How about adding some standard fractions for powers?

 ![Powers.png](https://forum.high-logic.com/uploads/default/original/2X/2/272efd5a23d796229f17d42afec1447e43f69a25.png)  
I also looked for ways to accommodate thousand separators and periods. I have a kerning class that includes period, comma, and ellipsis. By adding a substitution for that with hair space, numerators work OK, but denominators break the fraction.  
 ![Separators.png](https://forum.high-logic.com/uploads/default/original/2X/b/bb03e9c5c1ad43a4bd2206f8fa0e0ba4b61855cc.png)

---

<div class="post-metadata">

**Author:** ![MikeW](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@MikeW](https://forum.high-logic.com/u/MikeW)\
**Post date:** [May 29, 2017, 8:07pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/37 "2017-05-29T20:07:54Z")

</div>

Never seen a real world use of large fractions with a separator before. Are separators used in the UK or the Continent with large fractions?

---

<div class="post-metadata">

**Author:** ![ErwinDenissen](https://forum.high-logic.com/user_avatar/forum.high-logic.com/erwindenissen/32/9430_2.png) [@ErwinDenissen](https://forum.high-logic.com/u/ErwinDenissen)\
**Post date:** [May 29, 2017, 9:36pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/38 "2017-05-29T21:36:42Z")

</div>

> [@Bhikkhu Pesala](#):
>
> How about adding some standard fractions for powers?

I don’t think frac is intended for this.

---

<div class="post-metadata">

**Author:** ![PJMiller](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/p/f17d59/32.png) [@PJMiller](https://forum.high-logic.com/u/PJMiller)\
**Post date:** [May 29, 2017, 9:58pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/39 "2017-05-29T21:58:47Z")

</div>

I would be happy if the fractions feature just did fractions! 😆

---

<div class="post-metadata">

**Author:** ![MikeW](https://forum.high-logic.com/letter_avatar_proxy/v4/letter/m/7ba0ec/32.png) [@MikeW](https://forum.high-logic.com/u/MikeW)\
**Post date:** [May 29, 2017, 10:12pm UTC](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575/40 "2017-05-29T22:12:53Z")

</div>

It does just do fractions…but the feature is dumb, not smart. Which is why we are all going through this fun exercise to fool the end applications to do our bidding without user intervention.

We all can be smarter than what most/many applications are capable of using. When we find an application that fails in processing our fonts and their instructions, we all ought to be contacting those application makers about the problem…after we make sure that our coding is correct anyway. This works for a few companies, not so well with a particular monolithic company.

It’s sort of a chicken and egg thing. If we don’t stretch what is currently possible and complain, they won’t fix their stuff. On the other hand, unless users make use of such features then those companies see no compelling reason to fix or even expand their OT Feature support. InDesign has spotty feature support, QXP has a larger feature support and is still growing (both ID & QXP as regads westers scripts, but ID supports middle eastern languages and Q doesn’t natively yet) . AD has the most complete and functional support for western scripts and makes a great test bed.

[Previous page](https://forum.high-logic.com/t/opentype-features-order-of-precedence/3575.md?page=1)
