SOLVED Multiple replacement rule in .designspace
-
Is is possible to replace a glyph twice in
rules
?
If yes, how would that<conditionset>
and<sub>
look like?
-
every gap inbetween is infinite, how small it might be... and will result in a flickering default glyph.
I guess it depends more on how you set up your instances: if you have an instance at 300-700 then I would rather change the rule to substitute at 300-701 701-1000 instead, so you know what you get at the instance.
-
A comment about the code above.
Since interpolations use fractions, I would recommend to change the conditions to 300-700 / 700-1000, otherwise one will get a flickering default glyph.
Is there a reason to not do this but rather do 300-700 / 700.1-1000?
It seems to work fine.
-
Thanks @frederik, I did but could not find an answer to this particular setting. Luckly @paulvanderlaan handed me the logical solution via Slack:
<rule name="variations01"> <conditionset> <condition minimum="300" maximum="700" name="weight" /> </conditionset> <sub name="glyph" with="glyph.rvrn01" /> </rule> <rule name="variations02"> <conditionset> <condition minimum="701" maximum="1000" name="weight" /> </conditionset> <sub name="glyph" with="glyph.rvrn02" /> </rule>
-
check out the designspace spec: https://fonttools.readthedocs.io/en/latest/designspaceLib/readme.html#evaluating-rules
-
to specify:
not:<sub name="Glyph" with="Glyph.rvrn" />
but:<sub name="Glyph" with="Glyph.intr" with="Glyph.rvrn" />
For example use
"Glyph" minimum="100" maximum="300"
"Glyph.intr" minimum="300" maximum="700"
"Glyph.rvrn" minimum="700" maximum="1000"As far as I can see, there is no way to do this, but I’d like to have this confirmed.