New to Typophile? Accounts are free, and easy to set up.
Hi all,
I trying to write a macro with RoboFab that works in the same way as FL copy to composites from the metrcis window, so I can quickly copy the metrics from glyphs like "H" to the Hbar.
I was trying something like this :
#CopyToComposites
#
from robofab.world import CurrentFont
f = CurrentFont()
#
f['Hbar'].leftMargin = f['H'].leftMargin
f['Hbar'].rightMargin = f['H'].rightMargin
#
f.update()
The problem with this is it copies the actual sidebearing, so in cases like the Hbar the sidebearing is measured from the bar which overhangs the stem of the 'H', but I want it to be measured form the stem like you can do with the measuring line in the metrics window.

3 Jun 2008 — 11:25am
A pen to calculate the horizontal margins of a glyph at any given height by intersecting the shape with a horizontal line was recently added to Robofab, which seems to be what you need.
3 Jun 2008 — 12:55pm
So I need to copy this script into Robofab ? - where would I put the script ?