SOLVED Set background image “lock” by script?



  • I can find and alter the image settings in a glyph.lib:

    <lib>
        <dict>
          <key>com.typemytype.robofont.Image.Brightness</key>
          <real>0.6000000238418579</real>
          <key>com.typemytype.robofont.Image.Contrast</key>
          <real>1.0</real>
          <key>com.typemytype.robofont.Image.Saturation</key>
          <real>1.0</real>
          <key>com.typemytype.robofont.Image.Sharpness</key>
          <real>0.4000000059604645</real>
        </dict>
      </lib>
    

    But I don't see a flag for locking the image. Where should I look?



  • Hi Gustavo, thank you! Ok, that explains it. I assumed the lock was for each glyph separately.



  • hello @erik,

    locking background images is a global setting named glyphViewLockImages.

    it can be modified in the Preferences Editor, or using a script:

    # toggle background images lock
    from mojo.UI import getDefault, setDefault
    value = not getDefault("glyphViewLockImages")
    setDefault("glyphViewLockImages", value)
    

    groeten!