FontForge scripts (Tools menu)

@AbrahamLee I've seen you've had some success making this work on Windows, following this I got the example from the docs to show up in the menu but it doesn't run. Anyway, trying to run any Python from File > Run script doesn't do anything (and it never did for me, on several installations on Windows 10). Python only works when called externally like this:
"C:\Program Files (x86)\FontForgeBuilds\fontforge" -lang=py -script scripts\make.py
And from File menu, only FF scripts work.
Any pointers? @Dave Crossland presumably you've got this all figured out? I'd be thankful for any help.

Comments

  • AbrahamLeeAbrahamLee Posts: 243
    I don't go that route at all, actually. And to be honest, it took a while to get something that not only did what I want, but to give me error messages when something didn't work. There's almost no error feedback within the application in the default state. I think that was the biggest hurdle for me at first because I didn't know why things weren't working. It either would just crash without warning or would say some fatal error happened with no details.

    I have several files that make things work smoothly, but the main thing that helped me was to have one file that contained the scripts I actually want to use and another that is dedicated to loading those scripts into the Tools menu. If you want to PM me, I'd be happy to share the files so you can inspect exactly how I do it. It wasn't intuitive and I'm glad I figured it out. It's great to have the open capability. The only thing that really frustrates me is that you can only create the dialog boxes that FF has pre-coded. So, if you have a command that takes multiple inputs, it often requires multiple consecutive dialog boxes to get the data. On Linux we might be able to get around this since the python library is in the system-level python directory and you can use anything else there, but on Windows, there's no current way to integrate any of the other GUI libraries without some massive hacking. So, I've resorted to just living with the plethora of dialog boxes.

    Anyway, let me know if you want to see my files.
  • Dave CrosslandDave Crossland Posts: 1,047
    I haven't used Windows in 20 years, and I haven't used FontForge for my own work in about 3 years, so I'm sad to say I can't help
  • Adam JagoszAdam Jagosz Posts: 357
    Thanks for letting us know, Dave.
    The files I got from Abraham fixed the issue for me. Later when I have the time, I will post here more about why the approach works as opposed to what I tried initially, for posteriority. Thank you Abraham.
  • AbrahamLeeAbrahamLee Posts: 243
    You're very welcome!
  • Thomas PhinneyThomas Phinney Posts: 1,585
    What have you been using lately, Dave?
  • Dave CrosslandDave Crossland Posts: 1,047
    These days I design spreadsheets 😭
Sign In or Register to comment.