Closed hyvyys closed 2 years ago
Hi @hyvyys , this is mainly doe to the fact that after the EOF version the syntax changed a bit. As TR is now Py3 based (and 2.7 backwards compatible) i hat to make some changes. Now the imports are more strict and also the FL (Fontlab) proxy has moved one node deeper.
Correct syntax would be:
from typerig.proxy.fl.font import pFont
Hi @kateliev, I installed the latest version from this repo, and modified my script to the following:
from typerig.proxy.fl.font import pFont
Now I get this error:
No module named font (line 5):
Traceback (most recent call last):
File "<string>", line 5, in <module>
ImportError: No module named font
from typerig.proxy.fl.objects.font import pFont
This worked for me instead.
@hyvyys Yes this is the correct way to do it! Sorry for dropping a word in the suggested solution above!
@kateliev Report of an error in Delta Machine
Traceback (most recent call last):
File "C:/Users/Context/Documents/FontLab/FontLab 7/Scripts/Delta Machine/DeltaMachine.py", line 26, in
@kateliev A safe backwards- and future-compatible fix for this would be:
try:
from fontlab_private.fontTools.pens import statisticsPen
except ImportError:
from fontTools.pens import statisticsPen
(And similar in the other portions that use fontTools)
Alternatively, you (@kateliev ) might create your own slim proxy for some fontTools objects that does this try/except importing, and in your real code just import that
@StefanPeev TypeRig is now updated on https://github.com/kateliev/TypeRig
Fresh Windows & FontLab 7 installation, installed TypeRig via Scripts > Update/Install, restarted, and failed to run a script:
What am I missing?