I have a set of empty glyphs without outlines, but with defined kerning groups and colors. I need to create composites for them but with my own recipes. What I already tried:
Glyph / Create Composite – it’s works fine for glyphs that expect to have components, like IJ or Aacute. But it doesn’t work for the Iota glyph that I want to create from the I glyph component, etcetera.
Glyph / Add Glyphs – works perfect with my list of recipes like I=Iota or I+dieresiscomb=Iotadieresis. The only problem is that the generated glyphs are completely updated and lose their properties such as color or kerning groups.
Script – I believe it could be possible to make what I need but I can’t figure out how to write the right command.
composites = [
def updateGlyphWithRecipe(recipe, name):
for layer in Glyphs.font.glyphs[name].layers:
layer.makeComponents() # but with recipe
for g in composites:
Is it possible to add the recipe to makeComponents() as an argument… or there is some other method for this?
If you’re comfortable with editing the GlyphData.xml, that’s definitely the preferable approach. That will bake it right into your workflow, you can just use the regular commands such as Create Composite without having to run a custom script every time.
Yes, I agree, in most cases this is the best way. What I want is possible with using the GlyphData.xml + the Filter list to select all this glyphs at once. As I said, I want to try it too.
The reason why I want it is that certain Greek and Cyrillic glyphs claim to be built from the Latin alphabet. In the image, they are marked in yellow. This is only an approximate set of candidates for composites and there will still be revisions (not sure about sigmaLunateSymbol and some others), but I think the principle is clear.
If you only have a single item in a tuple, you need to add a comma. That’s a consequence of Python’s operator overload. Like this:
Not that you’d notice much of a difference with the current scope of the script, but tuples are much more efficient (think memory and performance) than lists. If you have collections that won’t change, better use a tuple.