Hi all,
What I trying to do here is find a quicker way to position the accents on italic glyphs.
The process I'm usng at the moment -
1. With the base glyph and accent in place - Glyph > create glyphs (Picture 1)
2. In the glyph window I select the accent and use center. (Picture 2)
This seems to work fine as a starting point, but it's really repeative, I was looking for a quicker method possible using a python script.
I've had experience with other languages such as ActionScript and PHP, I'm comfortable with the idea of scripting but I've only just started looking at RoboFab and Python so I could have this completely wrong.
I wrote this code today in an effect to speed up the process, thinking if I had a value for the aacute I could then use it for the eacute etc.
from robofab.world import CurrentFont
f = CurrentFont()
acute = 20
upperShift = 80
upperAcc = 164
grave = 45
circumflex = 0
dieresis = 10
aring = 70
tilde = 15
macron = 30
breve = 22
f['aacute'].components[1].offset = (acute,0)
f['agrave'].components[1].offset = (grave,0)
f['acircumflex'].components[1].offset = (circumflex,0)
f['adieresis'].components[1].offset = (dieresis,0)
f['atilde'].components[1].offset = (tilde,0)
f['aring'].components[1].offset = (aring,0)
f['amacron'].components[1].offset = (macron,0)
f['abreve'].components[1].offset = (breve,0)
#
f['ccedilla'].components[1].offset = (0,0)
f['cacute'].components[1].offset = (acute,0)
f['ccircumflex'].components[1].offset = (circumflex,0)
f['cdotaccent'].components[1].offset = (aring,0)
f['ccaron'].components[1].offset = (circumflex,0)
It works to a point but it would be quicker to go to each glyph and use the center method. What I thought would be useful is a center method to use within the code, something like -
f['aacute'].components[1].offset = (center,0)
f['agrave'].components[1].offset = (center,0)
f['acircumflex'].components[1].offset = (center,0)
So my question is, is this possible



