The slnt axis is for interpolable italics aka obliques. That’s why the spec specifies the values as being an angle from -90 to 90, so that the end user can set their desired angle of slant.
The ital axis is not usually meant to be used for interpolation. That’s why the spec specifies the values must be from 0 to 1. It allows for fractional values, but it states “this is not expected to be common”, since that is when you would typically use slnt instead.
Browser support isn’t perfect for ital and slnt axes, but if you check Arrow Type’s VF Slant Test on various browsers, you’ll see that so far it mostly follows the above interpretation. If your italics are interpolable, a slnt axis will give you the best browser support, and you can set the slant angle with the high-level CSS property font-style: oblique 10deg. If your italics are not interpolable, browser support is best if you use ital (and preferably split your font into two fonts with discrete ital values) and enable your italics via the high-level CSS property font-style: italic. If you use the wrong axis, the high-level CSS properties won’t work, and you’ll see problems like your italics rendering upright or your conditional glyph substitutions getting ignored.
Which browser does not support a variable italic axis?
The only remaining browser issue I am aware of is Safari’s Optical Size problem.
The spec is clear that it can very well be used as a variable axis. Any axis can be variable or just a mere design axis. Italic is no different.
The spec also says that Italic is not supposed to be replaced with Slant. The purposes are distinct. And if you replace italic with slant, you forfeit style linking.
Yes, the purposes are distinct. I think the word “italic” itself is what’s causing some confusion here. From an end-user perspective, “italic” includes both italics and obliques, which I’ve been referring to as “true italics” and “oblique italics” for clarity. From a type designer’s perspective, “true italics” generally have non-interpolable outlines, and “oblique italics” have interpolable outlines. The spec seems to have been written with this in mind, as it seems extremely clear to me that slnt is designed for interpolable “oblique” italics, and ital is for non-interpolable “true” italics.
What do you mean by forfeiting style linking? The I button in a word processor can activate italics in a font that uses slnt.
It seems like this has created a mess, as if there wasn’t enough of it. Wouldn’t it be better to have one single axis, ital with a scale in positive degrees? Too late to change?
The spec says ital and slnt are not meant to be used together in most cases, which only highlights that their job is the same — to be the i button, applying the italic styles. In this context, italic is the secondary style for emphasis, and it doesn’t matter if it’s interpolatable oblique or true italic.
And scientists use Kelvin to measure temperature. Negative angle hardly makes sense to the users, dragging the slider backwards
Yes, that is kind of what I was about to answer to Jens’ question. If you take the user perspective, which I wrote explicitly from, the negative value has is not sensible. If I drag a slider in a LTR environment from left to right, I expect its value to increase. No matter how the engineers implement it behind the scenes. And my issue was and is, that when I look into a lot of fonts out there, the behaviour is all over the place.
The OpenType spec is not targeted at end users. Apps presenting variable fonts are not required to expose variation axes as sliders, and sliders don’t have to have the smaller numerical value on the left side, and the axis range that’s presented to the end user does not have to be the same as the one internal to the font. But that is the easiest way to implement controls for variable fonts which is why the controls in most apps look exactly like that.
For example, graphic design apps could offer dials for controlling the slant angle, matching the tilt of the dial to the slant angle. Mapping that to OpenType-complient values for accessing the slnt axis values is not difficult, but it’s more work than offering the same UI for all axes, which is why controls for variable fonts are as they are in most apps.
When most fonts follow the spec, apps can make tailored UI controls and offer sensible fallbacks to other variable fonts. When fonts make up their own axis ranges and axis tags, that is not possible. So, I am sympathetic to the OpenType spec in this regard, as it is just a set of technical documents for developers. On the other hand, the fact that most developers would implement this spec in the easiest way possible was predictable, so maybe I am also expecting too much.
Not the point. The spec does not need to make sense to the end users. How you solve this in an app’s UI is a different question.
I cannot help but think this is an overinterpretation. It will often be the case that Roman and Italic are in two different files and thus will not be variable. That’s what I understand when I read “can be used as a variation axis within a variable font, though this is not expected to be common”. Shall we avoid using ital as a variation axis because it was not expected to be common? Definitely not.
The same is true about the Slant axis, it is just formulated the other way around: “It can also be used within a STAT table in non-variable, oblique fonts to provide a complete characterization of a font in relation to its family within the STAT table.” (From the slnt recommendations.)
Fair enough. The spec does give examples for both uses with oblique styles.
Thanks for reminding me of the test page. I remember seeing it at one point but had forgotten about that. Will have a closer look. I was remotely involved in a project where the italic of a VF was applied correctly for <em>...</em> in all browsers. I didn’t do the CSS and not the testing either. I’ll see if I can ask if they had to do some magic for the italic to work.
Thanks, I didn’t know that! I built two test cases, one with the usual ital Format 3 style linking from 0 to 1, and one with slnt Format 3 linking 0 to -8. Here are the results (the middle H’s are selected and have italics applied with Cmd-I):
Cocoa apps (TextEdit and Pages): both slnt and ital style linking work!
I understand that, but why is that any better for the developers? There’s one button for italic, but 2 axes applying for its job (style linking is why they are in the specs, right?). The spec’s reason for the 2 axes is different design, but that difference is irrelevant for style linking/the i button, which cancels out the purpose of having 2 axes. But developers have to deal with both, and figure what if both are present.
The axes values are not used (if I’m not mistaken) for anything other than showing to the user, so the negative angle means that developers need to reverse one special slider for no good reason. Do any apps do that?
At the same time, type designers have to figure which axis to use for a better support in practice, which apparently is not clear even based on this discussion. It probably creates a feedback loop of uncertainty between type designers and app developers. So I fail to grasp what the pros are. Keep ital with positive angles, deprecate slnt and it’s straightforward for everyone, no?
Consistency helps. Angles being defined in the same direction across the entire OpenType spec makes it easier to work with as a file format. (Although I would not be surprised if there were exceptions.)
CSS (not an app, but an interface to variable fonts nonetheless) defines slant angles in clockwise direction. Web browsers reverse the angle specified in CSS code to get the value for the slnt axis. The Google Chrome web dev tools even have an appropriate control:
The CSS code above uses the slnt axis location -11, abstracting that mapping away for CSS authors.
I agree. The OpenType spec is followed so loosely by so much software and fonts that I have a feeling the spec does not want to commit to a clear messaging. The spec authors know whatever they write will never be followed by many software and font makers and thus preemptively broaden the spec too much. But that is just my personal opinion; I have little insight into how this specific spec was written.
Not unless you write that axis range down somewhere for font makers and software developers to follow and also convince them that using your range is so much better than just using the spec we already have.
It seems to me that the OpenType spec was written to be somewhat flexible and avoid being too prescriptive in order to allow for experimentation and edge cases. The unintended side effect is it leads to some uncertainty and a lack of clarity, so you have to read between the lines a little bit in some parts, like the descriptions of ital and slnt axes.
For instance, @mekkablue noted these two excerpts which are somewhat inversely complementary of each other:
Interpretation: ital is a special axis that is primarily used to describe families with roman and “true” italics, which aren’t generally expected to interpolate. But the axis does allow for interpolation (“variation”) to accommodate some uncommon edge cases.
Interpretation: slnt is primarily meant to describe families with roman and “oblique” italics which are generally expected to interpolate along the variation axis. But slnt can also be used in static fonts to describe oblique styles in relation to upright.
Even without those excerpts, I think the ranges defined in the spec (ital: 0 to 1, slnt: -90 to 90) are alone more than clear enough to support my interpretation that generally, ital should be used for non-interpolating italics and slnt should be used for interpolating italics. 0 to 1 implies a binary switch, i.e. from roman to true italic. -90 to 90 implies a variable slant angle, which is the most sensible unit of measurement for variation from upright to oblique italics.
0.0 to 1.0 is not binary, they are multiplication factors. It is equivalent to 0% to 100%. If you multiply something with 1.0, that means it is 100% that value. 1.0=100% meaning fully italic. 0.5=50%=half way, etc.
Perfectly usable for anything oblique/italic. It cannot be degrees because an italic style is not necessarily related to angle, and a Roman is not necessarily 0 degrees (especially for the latter, you’ll find many examples in type history).
Slant is necessary where the angle is the primary matter (it’s clear when there is also a backslant for example). Keep in mind that the number is imprecise unless you correct it in avar. 50% of 8 degrees is not 4 degrees in linear interpolation. For most use cases, the deviation will be small enough to not matter, but is best to be aware of that.
And because these are predefined axes, UI devs know what to expect and can create a better interface, e.g. display the Italic axis value as percentage.