<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with scripting]]></title><description><![CDATA[A list of topics that have been tagged with scripting]]></description><link>https://forum.robofont.com/tags/scripting</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 09:47:41 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/tags/scripting.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Feb 2021 20:05:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Some commands leave behind &quot;ghost selection&quot;]]></title><description><![CDATA[noted down for future RF version to auto deselect on removeContour :)
thanks!
]]></description><link>https://forum.robofont.com/topic/921/some-commands-leave-behind-ghost-selection</link><guid isPermaLink="true">https://forum.robofont.com/topic/921/some-commands-leave-behind-ghost-selection</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Wed, 03 Feb 2021 20:05:10 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] Command Palette]]></title><description><![CDATA[@tallpauley Thanks for the update to run the command! This gives me something to play around with.
To take it a step further, is there a lib API I can use to also pull in space center and glyph view shortcuts, like whatever they use to populate their "Hot Keys" tabs? (Btw, I won't filter out commands that don't have shortcut keys, this is part of the allure of having a command palette, you can access commands that don't have shortcuts keys defined yet).
I saw mojo.UI.setGlyphViewDisplaySettings, but this isn't all the available commands for glyph view. For space center I didn't see any API in mojo.UI
I would dig around myself, but I think you guys compile to .pyc and I don't want to violate the EULA by reverse engineering (hence me actually clicking on the EULA lol). Once I have all the commands available, I think I should have what I need.
]]></description><link>https://forum.robofont.com/topic/872/command-palette</link><guid isPermaLink="true">https://forum.robofont.com/topic/872/command-palette</guid><dc:creator><![CDATA[tallpauley]]></dc:creator><pubDate>Wed, 27 May 2020 22:44:25 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Mass-import ligatures&#x2F;svgs]]></title><description><![CDATA[@gferreira I was able to get it to work once I downloaded additional module files. thanks!
]]></description><link>https://forum.robofont.com/topic/870/mass-import-ligatures-svgs</link><guid isPermaLink="true">https://forum.robofont.com/topic/870/mass-import-ligatures-svgs</guid><dc:creator><![CDATA[kylelynah]]></dc:creator><pubDate>Wed, 30 Dec 2020 23:39:41 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] How to copy anchors from one font to another]]></title><description><![CDATA[hello @horashann,
yes, this can be done with a simple script:
# get source and destination fonts
srcFont = AllFonts().getFontsByFamilyName('MyFontFamily').getFontsByStyleName('Regular')[0]
dstFont = AllFonts().getFontsByFamilyName('MyFontFamily').getFontsByStyleName('Italic')[0]

# iterate over selected glyphs in the source font
for glyphName in srcFont.selectedGlyphNames:

    # get the source glyph
    srcGlyph = srcFont[glyphName]

    # if the glyph doesn't have any anchors, skip it
    if not len(srcGlyph.anchors):
        continue

    # get the destination glyph
    dstGlyph = dstFont[glyphName]

    # iterate over all anchors in the source glyph
    for anchor in srcGlyph.anchors:

        # copy anchor to destination glyph
        dstGlyph.appendAnchor(anchor.name, (anchor.x, anchor.y))

# done!

make sure to replace MyFontFamily and Regular / Italic with the family name and style names of your fonts.
cheers!
]]></description><link>https://forum.robofont.com/topic/862/how-to-copy-anchors-from-one-font-to-another</link><guid isPermaLink="true">https://forum.robofont.com/topic/862/how-to-copy-anchors-from-one-font-to-another</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Tue, 12 May 2020 15:19:30 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] How to share living instance?]]></title><description><![CDATA[Dont get it why Gustavo's answer does not work...
You initiate only once an instance from that class and import it back into other modules.
A fourth easy solution is to add a variable to NSApp()
import AppKit

app = AppKit.NSApp()
app._my_extenstion_name_controller = "foo"

this will be accessible everywhere, but this is actually the same as Gustavo's answers, just stored somewhere else :)
]]></description><link>https://forum.robofont.com/topic/833/how-to-share-living-instance</link><guid isPermaLink="true">https://forum.robofont.com/topic/833/how-to-share-living-instance</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 10 Apr 2020 13:15:59 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Recover programmatically wiped Input Samples?]]></title><description><![CDATA[Lifesaver! Thanks @frederik
]]></description><link>https://forum.robofont.com/topic/795/recover-programmatically-wiped-input-samples</link><guid isPermaLink="true">https://forum.robofont.com/topic/795/recover-programmatically-wiped-input-samples</guid><dc:creator><![CDATA[ryan]]></dc:creator><pubDate>Mon, 27 Jan 2020 19:24:40 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] How to get programmatically highlighted glyph in the space center]]></title><description><![CDATA[maybe you have to explain what you want to achieve...
A space center object has getRaw which returns the input text as seen in the control and get which returns a list of glyph names, those are parsed from the input controls.
]]></description><link>https://forum.robofont.com/topic/793/how-to-get-programmatically-highlighted-glyph-in-the-space-center</link><guid isPermaLink="true">https://forum.robofont.com/topic/793/how-to-get-programmatically-highlighted-glyph-in-the-space-center</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Sat, 25 Jan 2020 14:46:31 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] unexpected behaviour when copying glyph in Python]]></title><description><![CDATA[@gferreira I see, thanks!!!
]]></description><link>https://forum.robofont.com/topic/785/unexpected-behaviour-when-copying-glyph-in-python</link><guid isPermaLink="true">https://forum.robofont.com/topic/785/unexpected-behaviour-when-copying-glyph-in-python</guid><dc:creator><![CDATA[jansindl3r]]></dc:creator><pubDate>Wed, 08 Jan 2020 11:06:17 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] Contextual menu — enable&#x2F;disable entries?]]></title><description><![CDATA[oh, idd not working as it should be... will be fixed in next beta/release
thanks
]]></description><link>https://forum.robofont.com/topic/764/contextual-menu-enable-disable-entries</link><guid isPermaLink="true">https://forum.robofont.com/topic/764/contextual-menu-enable-disable-entries</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 13 Dec 2019 22:22:36 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Adjust preferences based on UFO document?]]></title><description><![CDATA[the /data folder seems like a good place
you can subscribe to fontBecameCurrent and execute the .py file with
from lib.scripting.scriptTools import ScriptRunner

ScriptRunner("path/To/script.py)

]]></description><link>https://forum.robofont.com/topic/762/adjust-preferences-based-on-ufo-document</link><guid isPermaLink="true">https://forum.robofont.com/topic/762/adjust-preferences-based-on-ufo-document</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 13 Dec 2019 13:01:29 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Folder support in Start-up Scripts tab in Preferences]]></title><description><![CDATA[support for folders in the list of start-up scripts is now available in the 3.4 beta — thanks!
also added to the docs
]]></description><link>https://forum.robofont.com/topic/756/folder-support-in-start-up-scripts-tab-in-preferences</link><guid isPermaLink="true">https://forum.robofont.com/topic/756/folder-support-in-start-up-scripts-tab-in-preferences</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Fri, 03 Jan 2020 20:49:48 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Keep reference to an arbitrary vanilla window for later use]]></title><description><![CDATA[Well that doesn't surprise me since I have no idea what I'm doing. I'll read up on notifications. It would be helpful to know why this is bad though.
]]></description><link>https://forum.robofont.com/topic/745/keep-reference-to-an-arbitrary-vanilla-window-for-later-use</link><guid isPermaLink="true">https://forum.robofont.com/topic/745/keep-reference-to-an-arbitrary-vanilla-window-for-later-use</guid><dc:creator><![CDATA[okaytype]]></dc:creator><pubDate>Tue, 19 Nov 2019 21:05:19 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Glyph.newLayer() no longer working in RF3.3?]]></title><description><![CDATA[he Nowell,
Could you explain why glyph.newLayer(..) is not working for you? see the fontParts documentation.
Is there a traceback? This should work...
In RoboFont each glyph has his own undo manager and its always  possible to add an other glyph undo item to a different undo manager, but requires some deep hacking. I dont think the solution is there...
This behaviour was indeed different in RF1 as layers where stored in the glyph.lib, this was a tiny hack on the UFO specification. UFO3 has own implementation of layers.
From a UX perspective this is not a good plan to have undos on different data (glyphs) sets at once.
Hope this makes sense...
]]></description><link>https://forum.robofont.com/topic/738/glyph-newlayer-no-longer-working-in-rf3-3</link><guid isPermaLink="true">https://forum.robofont.com/topic/738/glyph-newlayer-no-longer-working-in-rf3-3</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Sun, 17 Nov 2019 11:14:59 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Only PNG images can be added by a script?]]></title><description><![CDATA[If you need to work with JPG images, you could consider converting them to PNG format before adding them through the script.
And hey, if you ever need to optimize those JPG files for better performance or smaller sizes, check out jpg compress tools. They can help maintain image quality while reducing file sizes effectively.
]]></description><link>https://forum.robofont.com/topic/724/only-png-images-can-be-added-by-a-script</link><guid isPermaLink="true">https://forum.robofont.com/topic/724/only-png-images-can-be-added-by-a-script</guid><dc:creator><![CDATA[Kalisspera]]></dc:creator><pubDate>Tue, 05 Mar 2024 12:33:47 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] Possible bug in lib.fontObjects.fontPartsWrappers UIdocument()? Works in v3.2, but not latest v3.3 beta.]]></title><description><![CDATA[This should be solved in the upcoming release, and already works fine in the cutting-edge-nightly-build version...
]]></description><link>https://forum.robofont.com/topic/723/possible-bug-in-lib-fontobjects-fontpartswrappers-uidocument-works-in-v3-2-but-not-latest-v3-3-beta</link><guid isPermaLink="true">https://forum.robofont.com/topic/723/possible-bug-in-lib-fontobjects-fontpartswrappers-uidocument-works-in-v3-2-but-not-latest-v3-3-beta</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Tue, 05 Nov 2019 13:42:32 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] How can I reload a Python module on the *first* attempt?]]></title><description><![CDATA[Ahhh, that makes sense now.
That’s a good tip about __init.py__ as well.
Thank you so much for your help, Gustavo!
]]></description><link>https://forum.robofont.com/topic/722/how-can-i-reload-a-python-module-on-the-first-attempt</link><guid isPermaLink="true">https://forum.robofont.com/topic/722/how-can-i-reload-a-python-module-on-the-first-attempt</guid><dc:creator><![CDATA[ArrowType]]></dc:creator><pubDate>Mon, 04 Nov 2019 13:08:11 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_unsolved]] Decorating the RF objects!]]></title><description><![CDATA[@frederik Yeah that is very powerful. I have another related question. let's say I want my custom method to be executed every time an object changes. I don't want to add a defcon notification but rather override a method and use the super on an internal method of glyph object, then execute my own method. I looked at defcon but it seemed that it's only possible by overriding _set_dirty, but not sure if that's the right way. What do you think?
]]></description><link>https://forum.robofont.com/topic/716/decorating-the-rf-objects</link><guid isPermaLink="true">https://forum.robofont.com/topic/716/decorating-the-rf-objects</guid><dc:creator><![CDATA[bahman]]></dc:creator><pubDate>Thu, 17 Oct 2019 10:03:37 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Making a font the front window]]></title><description><![CDATA[hello @mr,
this seems to work:
from mojo.UI import AllFontWindows

f = AllFonts().getFontsByStyleName('Italic')[0]

for fontWindow in AllFontWindows():
    if fontWindow._font == f.naked():
        fontWindow.window().show()

cheers!
]]></description><link>https://forum.robofont.com/topic/678/making-a-font-the-front-window</link><guid isPermaLink="true">https://forum.robofont.com/topic/678/making-a-font-the-front-window</guid><dc:creator><![CDATA[gferreira]]></dc:creator><pubDate>Sat, 03 Aug 2019 11:35:24 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Can I get to the SpaceCenter InputText strings from Python?]]></title><description><![CDATA[I didn't know about spaceCenterInputSamples and managed to get at them through the space center window itself. I should probably look at updating these:
https://gist.github.com/okay-type/6e36bfd93e938f5f98253ab31a27f24e
https://gist.github.com/okay-type/85e6f60fc35092d5a6249ee26b2bdd4c
]]></description><link>https://forum.robofont.com/topic/677/can-i-get-to-the-spacecenter-inputtext-strings-from-python</link><guid isPermaLink="true">https://forum.robofont.com/topic/677/can-i-get-to-the-spacecenter-inputtext-strings-from-python</guid><dc:creator><![CDATA[okaytype]]></dc:creator><pubDate>Thu, 19 Sep 2019 16:47:49 GMT</pubDate></item><item><title><![CDATA[ [[qanda:topic_solved]] Set background image “lock” by script?]]></title><description><![CDATA[Hi Gustavo, thank you! Ok, that explains it. I assumed the lock was for each glyph separately.
]]></description><link>https://forum.robofont.com/topic/676/set-background-image-lock-by-script</link><guid isPermaLink="true">https://forum.robofont.com/topic/676/set-background-image-lock-by-script</guid><dc:creator><![CDATA[erik]]></dc:creator><pubDate>Wed, 31 Jul 2019 06:52:31 GMT</pubDate></item></channel></rss>