Adjust preferences based on UFO document?
frankrolf last edited by gferreira
I was wondering if there could be a possibility to adjust preferences based on the UFO opened.
- adjust the grid and snap values for a low-UPM project
- override the
previewSolidobserver to be outlined (for a skeleton font, for example)
Right now, I have this idea of just adding a .py file (which would change preferences) in the
/datadirectory of my UFO file, and have a startup script look for such a file. However, I wonder if there’s better suggestions for accomplishing the same.
(One downside of my idea is a permanent change of the preferences, rather than a by-project approach).
/datafolder seems like a good place
you can subscribe to
fontBecameCurrentand execute the .py file with
from lib.scripting.scriptTools import ScriptRunner ScriptRunner("path/To/script.py)