There's no such thing as cheating in type design: automated python anchors in Fontlab
As much as it would be great to meticulously arrange every little thing by hand, sometimes you just have to automate. Here's a FontLab script that I use a lot for adding anchors to the tops/bottoms of common letters. As soon as all the anchors are automatically inserted, you might want to move them around a little, depending on the font. Then simply select the diacritics you want to create, chose "Glyph > Create Glyphs" from the menu, and voila, instant diacritics.
Add Anchors
tString = "caron acute dieresis circumflex tilde ring grave hungarumlaut dotaccent breve macron hungarumlaut"
diacriticList = tString.split(" ")
tString = "a e dotlessi o u y n s z l t r c w g j"
lcList = tString.split(" ")
tString = "A E I O U Y N S Z L T R C W G J"
ucList = tString.split(" ")
def findCenter(g,topBottom):
if g != None:
r = g.GetBoundingRect()
center = Point()
center.x = r.width/2 + r.x
if topBottom == "top":
center.y = r.y + r.height
else:
center.y = r.y
return center
def addAnchors(anchorName,glyphList,yOffset):
for i in glyphList:
g = fl.font[fl.font.FindGlyph(i)]
center = findCenter(g,anchorName)
g.anchors.clean()
a = Anchor(anchorName,center.x,center.y+yOffset)
g.anchors.append(a)
addAnchors("top",ucList,40)
addAnchors("top",lcList,60)
addAnchors("_top",diacriticList)
fl.UpdateFont()
»
