Mark glyphs - Python script ?

RachelR
5.Oct.2008 4.38am
RachelR's picture

Is it possible to use Python or Robofab to mark a set of glyphs ?

I have a complex set of glyphs that I want to mark in a number of fonts to then alter. I know I could to it with a class but I would have to import the class into each font, but with a macro I could simple call it in each font that is opened.

I was thinking something like :

glyphsMark = ['A','C','D','K','1','3','/']

glyphsMark.color = red

Rr



gferreira
5.Oct.2008 6.47am
gferreira's picture

from robofab.world import CurrentFont

f = CurrentFont()

myGlyphs = [’A’,’C’,’D’,’K’,’1’,’three’,’slash’]

for glyphName in myGlyphs:
>>>f[glyphName].mark = 20
>>>f[glyphName].update()

f.update()

* replace “>>>” by a tab
** replace smart quotes with dumb ones


RachelR
5.Oct.2008 12.12pm
RachelR's picture

Thanks gferreira