You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the project may be on the cusp of making more regular use of python scripts and potential user contributions. So I think I'll look into extending the interactive aspects of the scripting interface a bit more, in some ways we've already discussed in past issues and in other ways that are new (and easier). Here is a list:
Modify registerMenuItem so that if the menu-function argument is the string "separator" the "menu-name' item is replaced with a menu separator.
Modify registerMenuItem so that if the menu-function argument is the string "link" the "data" field is treated as a URL, which is opened when the item is selected from the menu. (For good measure add an interface to the fontforge object for opening a web page in other contexts.)
If possible, re-enable the shortcut-string (now more or less ineffectual) as a "suggestion", so that if the specified hotkey is not already "taken" it is enabled on that item. (The tricky thing here is whether one can tell that a hotkey is taken. I don't remember.) Junk the current syntax in favor of the hotkey file syntax (if they are different). Don't require repeating the name in the shortcut string.
Write a short style guide, either in the docs or on the wiki (seems like docs would be preferable -- not many people know about the wiki), for scripts-for-other-people. Basically: encourage a single top-level menu item for each contribution with multiple sub-items. Then at the bottom a separator and a link to an "about" page. Also some suggestions for hotkey suggestions. Include the basics of how to write one module that does different things in different contexts.
Unless discovery is trickier than I expect this shouldn't add up to much work.
It seems like the project may be on the cusp of making more regular use of python scripts and potential user contributions. So I think I'll look into extending the interactive aspects of the scripting interface a bit more, in some ways we've already discussed in past issues and in other ways that are new (and easier). Here is a list:
registerMenuItemso that if themenu-functionargument is the string "separator" the "menu-name' item is replaced with a menu separator.registerMenuItemso that if themenu-functionargument is the string "link" the "data" field is treated as a URL, which is opened when the item is selected from the menu. (For good measure add an interface to thefontforgeobject for opening a web page in other contexts.)shortcut-string(now more or less ineffectual) as a "suggestion", so that if the specified hotkey is not already "taken" it is enabled on that item. (The tricky thing here is whether one can tell that a hotkey is taken. I don't remember.) Junk the current syntax in favor of the hotkey file syntax (if they are different). Don't require repeating the name in the shortcut string.Unless discovery is trickier than I expect this shouldn't add up to much work.