justvanrossum / fontgoggles

FontGoggles: Visual OTL Preview and QA
Apache License 2.0
399 stars 42 forks source link

Previews sometimes fail when multiple source files are changed #407

Open LettError opened 5 months ago

LettError commented 5 months ago

When FG has a designspace open..

.. and a font editor exports several .fea files for the masters (for instance when updating kerning), and this export is done super fast, by script,

..then FG notices a change in the first .fea and starts recompiling..

.. but then more .fea files are changed..

.. and then it can happen that this process fails with this message in the output:

  File "fontgoggles/mac/mainWindow.pyc", line 509, in _loadFont
AttributeError: 'NoneType' object has no attribute 'getExternalFiles'

For example, a designspace with a discrete axis might present in FG as 2 separate lines. When exporting kerning .fea sometimes one or the other or both don't show up. Stripy background, empty line. Repeating this brings the outcome where both lines are visible, but it is not ideal.

Unfounded suspicion: perhaps if FG would hesitate. Clearly that would be an expensive trade off if such a delay is too long. But maybe there is a delay that would not be noticable by the impatient user, but would give the files time to get saved.