Mark2Mark / variable-font-preview

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

Support for condition statements #15

Open gorjious opened 2 years ago

gorjious commented 2 years ago

I am using condition statements, such as the one below, to designate in which parts of a design space certain features are enabled, however, I am noticing that these don't seem to be currently supported.

I am using FontGoogles to preview the correct output, however, with my current set up it becomes highly inefficient to export each test font. There is a lot of guessing and checking to determine a condition, and I am currently working on a file with a lot of sources which takes a loooong time to build.

It would be enormously more efficient if I could test the conditions set in the feature code directly through Variable Font Preview.

Is this a feature that Variable Font Preview is capable of supporting?

#ifdef VARIABLE
condition 1 < wght < 1000, 0 < SHFT < 50;
lookup Now_1 {
    sub Ech-arm Now-arm' by Now-arm.long;
} Now_1;
#endif
Mark2Mark commented 2 years ago

Thank you!

I will implement these for sure. Thanks for the issue openeing.

Mark2Mark commented 2 months ago

Note: this feature will be implemented along with the Live Font mode, which is coming soon after a bunch of refactoring code for more reliable handling of switching modes.