SOLVED [RF3] Activate kerning in SC window? setDisplayStates doesn’t take
-
Hi Frederik and all,
I’m trying to have a script ensure that the 'Show Kerning' option is on in a Current Space Center, but I can’t get this specific option to work in the displayStates dict:
from mojo.UI import CurrentSpaceCenter sp = CurrentSpaceCenter() states = sp.glyphLineView.getDisplayStates() print(states) # features "'Show Kerning': False," states["Show Kerning"] = True sp.glyphLineView.setDisplayStates(states) # kerning is still off, 'Show Kerning' option is still False
I can set other properties in that dict no problem, just not the kerning. Is there a workaround?
Still on RF3.4 here (2004281315), would be great to find a solution that works for both RF3 and RF4. Thanks!
-
Ahhh! Sorry I missed that. Thank you @frederik :)
-
you can use
spaceCenter.setApplyKerning(True)
see https://robofont.com/documentation/reference/api/mojo/mojo-ui/#mojo.UI.setApplyKerning
setting display states should work better in RF4 :)