Mark2Mark / variable-font-preview

https://markfromberg.com/projects/variable-font-preview-3/
8 stars 0 forks source link

Allow non-integer values for 0-1 type of axis, e.g., Italic #26

Open romashamin opened 7 months ago

romashamin commented 7 months ago

variable-font-preview-italic-axis@2x

Seeing intermediate states of vector interpolation lets designers check for any path quirks. Currently, the slider for the Italic axis is discrete, allowing only the values 0 or 1, with no in-between values. This makes it impossible to check how the interpolation between upright and slanted shape works.

Please enable the slider to set non-integer values between 0 and 1 for such axes.

Mark2Mark commented 7 months ago

Thank you!

That has been done on purpose back then, usually that is how a UI would also implement it, if the axis has just the values 0 and 1.

But I see your point, and also for example in web interfaces (CSS) the font can still be set to values between.

May I ask, though: why do you define your italic space from 0 to 1, if you want to expose in-between values? Why not make the range bigger then?


Adding this as a reference for me and others here: discrete axes In GlyphsApp

romashamin commented 7 months ago

May I ask, though: why do you define your italic space from 0 to 1, if you want to expose in-between values? Why not make the range bigger then?

Yeah, that’s a good question :)

From what I understand, unlike the Slant axis, which can reflect the actual angle, like 0—12 or even -12—12, the Italic axis can only contain a range of 0—1. This assumption might be wrong, though. I'll check.

Mark2Mark commented 7 months ago

Oh, yeah, didn't think about that. Thanks for the pointer. Would be great if you can find some clues, let me know 😊

romashamin commented 7 months ago

Why not make the range bigger then?

According to the spec, ital is limited by 0 and 1:

Values must be in the range 0 to 1. A value of 0 can be interpreted as “Roman” (non-italic); a value of 1 can be interpreted as (fully) italic.

So if the designer sets 12 instread of 1 as the second point that could lead to unpredictable results.

Also, Rainer Erich Scheichelbauer mentiones that 0-1 is still interpolatable so it seems like the issue makes sense.

florianpircher commented 7 months ago

I believe the slnt axis is preferred if you want the user to pick in-between values. All axes are interpolatable, so even a range of 0–1 is technically interpolatable. In practice, such a range is understood by many apps to not interpolate.

romashamin commented 7 months ago

@florianpircher personally, I agree and would love to equip my typefaces with the slnt axis. It’s more flexible and accurately reflects that my typeface provides slanted letters that don’t change their shape as a true italic design implies.

Unfortunately, as far as I know, to date ital has better software support than slnt. So, I decided that using ital, especially if the typeface doesn’t include backslanted styles, would be a smart choice.

Regardless, choosing between ital and slnt for a particular typeface is a different question. Seeing interpolation between 0 and 1 in the plugin would help type designers like me test the interpolation for typefaces with an ital axis. Frankly, this feature was the main reason I bought the plugin.

Mark2Mark commented 7 months ago

Just for now, as long as the plugin does not support the fractions between 0 and 1, you can increase the axis range to something higher than 10 by just changing the max value of the max italic master(s). You might need to do that temporarily to check the interpolations in between and change it back after checking.

I will need some time to implement that option and it will have to be a setting, because the current stepping for small ranges is also there for several reasons. So users will need to choose (and it increases the workload and maintenance, hence the waiting, sorry for that)

Mark2Mark commented 7 months ago

Unfortunately, as far as I know, to date ital has better software support than slnt.

Have you opened a thread on the Glyphs forum about that? What are the limitations you experienced with the slnt? Maybe Georg has some insights of how those could be avoided instead of the use-ital-instead-hack. I mean the specs are there for some reasons I guess, so if the spec expects non-binary italics to be slnt, then it might be better to push the implementing applications to adhere to the spec. Just my 2 cents there. 🙃

romashamin commented 5 months ago

Same request for the width axis: it would be helpful if we could set non-integer values on the gauge.

image
Mark2Mark commented 5 months ago

This has nothing to do with the axis type/name. It happens for all axes: The plugin is setting the steps for axis ranges that are smaller or equal to 10. Usually in design applications or alike, you won’t be able to set fractional values anyway. You can still consider increasing your range, in order to get finer control. Why do you have such a small range from 1 to 5, if you want finer steps?

You can also use the axis location or mapping (see the Glyphs recommendations, there has been changes recently in what of those 2 they recommend) if you want to keep your internal design locations different from the exported font ranges.

romashamin commented 5 months ago

Why do you have such a small range from 1 to 5, if you want finer steps?

To match Glyphs’s width classes.

You can also use the axis location

I’ve actually set up the Axis Location parameter, as you can see in the screenshot. Why isn’t the plugin using it?

Screenshot 2024-04-09 at 17 24 29
romashamin commented 5 months ago

Usually in design applications or alike, you won’t be able to set fractional values anyway.

Yes, but type designers don’t typically use design applications or alike to test their work-in-progress font vectors for quirks. Your plugin could be really helpful for that—that’s the idea.

If you’re not interested in implementing this, that’s fine. Just let me know, and I won’t bother you about it anymore.

Mark2Mark commented 5 months ago

To match Glyphs’s width classes

You don’t have to put the master values to be the same as the width classes.

That's why I am asking you those things, because it could be a setup that is not how it is supposed to be. And making the plugin fix quirks caused by faulty setups of the file is not the right route to go.

This has nothing to do with that I am not interested in fixing it changing things. It is about finding and fixing the actual cause.

So for your particular problem with the Width axis: you can have your masters at for example 0, 200, 400 and still set the width classes to 2, 4, 5

(Those values are chosen randomly just as an example, but generally this is how you should set up your file)

This will also make your sliders way more granular without the need of fractions there. In fact, with my example you'd have a range of 400, which for a width axis is a lot, even if you have a super compressed master.

Mark2Mark commented 5 months ago

The axis location parameter is currently undergoing changes, due to the changes in Glyphs recently. There will be a switch between internal and external values once.

For now it uses the same interpolation as Glyphs uses internally.

romashamin commented 5 months ago

I agree, I can switch to bigger values for the width axis, but the ital axis is still limited to a maximum value of 1.

Mark2Mark commented 5 months ago

Understood. Still have it on the list to see what I can do about the italic axis. Thanks for the reminder:)