rclt for VF, minimum range not working

To avoid too many special layers I’m using a rclt feature for the dollar sign. This is the feature code:

#ifdef VARIABLE
condition 130 < wght < 170, 50 < wdth < 150, 10 < opsz < 30;
sub dollar by dollar.alt1;
#endif

The handbook describes that the “less-than” sign that stands for the lower limit should behave like a ≤ sign. But at wght 130 and wdth 50 the dollar is not being replaced by dollar.alt1. The replacement happens at wght 131 and wdth 60.

So there are two issues:

  • the < is not behaving as ≤
  • the replacement on the wdth axis doesn’t happen as expected at 51, but at 60

My width axis starts at wdth 50, so I can’t define anything lower in the rclt feature. Is there a workaround? And what is happening?

The nice numbers can be a bit misleading. Internally, they are converted to a range of -1 to 0 to 1 with a limited fraction precision. So it could be a rounding error if it doesn’t flip at exactly the spot you expect. So it is a good idea to an add tiny extra room to make sure it jumps when expected. I’ll check the code and the handbook to make sure it is in sync.

And you should be able to leave out the lower bounds of the axis in a condition. So 50 < wdth < 150 could be wdth < 150 (and you can remove the whole rule if it covers the full axis.).

I see! Thanks for the explanation.
I updated the condition to this:

condition 130 < wght < 170;

So it should cover the whole range of the width and opsz axes. Though the switch is still happening at wdth 60. There are no issues for the opsz axis.

Do you have any axisLocation or axis mappings?
Can you send me the file?

I got axis location parameters set up. I tested disabling them, but there is no difference in the behaviour of the substitution of dollar.

I send you the glyphs file :envelope:

I had a look at the file. You have some bracket layers and custom feature variation code. But they are in different features (the bracket will be written to rlig and the custom code is in rclt. It seems this is not handled correctly by Glyphs. But using rlig for the custom code works fine.

thank you! rlig works :partying_face: