Anyone know a similar script to this "spacing" one

Used this “Selection & HH * HHOO * OO to Tab” script in Glyphs 2, but tried finding as current a version as possible, and it doesn’t seem to be functioning now in Glyphs 3.

Anyone know a similar script out there?


You can download Wei Huang’s scripts via plugin manager. Especially these scripts might work for you:
Show Each Glyph in Context
Show Each Glyph in Context (New Tab)

Also you can search for new scripts in there

1 Like

Do you mean the script from Mark Frömberg’s Scripts? It looks like it should be fairly straightforward to update it for Glyphs 3.

Here is an updated version that you can run from the Macro Panel:

import GlyphsApp
import vanilla

Doc = Glyphs.currentDocument
Font = Glyphs.font
selectedLayers = Font.selectedLayers
listOfGlyphNames = [ for thisLayer in selectedLayers ]
ListJoined = "/" + "/ ".join(listOfGlyphNames).replace(' ', '')

class OpenTab(object):
	def __init__(self):
		self.w = vanilla.FloatingWindow((500, 100), "Open Tab:")
		self.w.myTextBox = vanilla.TextBox((10, 10, -10, 40), "Open Tab wit these guys:")
		self.w.editText = vanilla.EditText((10, 30, -100, 50), ListJoined  + "\n/H/H/Placeholder/H/H/O/O/Placeholder/O/O\n/n/n/Placeholder/n/n/o/o/Placeholder/o/o", sizeStyle='small', callback=self.editTextCallback)
		self.w.myButton = vanilla.Button((410, 30, -10, 20), "Do it!", sizeStyle='small', callback=self.buttonCallback) 
		self.w.setDefaultButton( self.w.myButton )

	def editTextCallback(self, sender):
		print("text entry:", sender.get())
	def buttonCallback(self, sender):
		characters = self.w.editText.get()
		Glyphs.currentDocument.windowController().addTabWithString_( characters )
1 Like

Thank you for the references @obiobik. Will check those out.

Thanks much for pulling this together @FlorianPircher! Yes, you’re correct, it was from the scripts you referred to. Will try it out.

Mark did have a note on his Git page that most of them were outdated. That was the only one I tried (so far) from the group. Perhaps there are other popular ones that may benefit from an update at some point.

Where was that script?

You can do that with placeholders though. No script necessary.


And there is also a version with placeholders:

Both Python 2, but trivially convertible to Python 3 with 2to3. Not sure if @Mark still wants to maintain the repository. Some of the scripts are easy to convert, some require more work.

Thanks for pinning me. Indeed those scripts is unfortunately not well maintained. I should really do a session and bing the script to the 21st century (and also add more usefull things)

Hope I can find some time, soon. Otherwise PRs are welcome, as well.