Copy to Composites Macro - RoboFab ?

ReginaldV's picture

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 :

from import CurrentFont
f = CurrentFont()
f['Hbar'].leftMargin = f['H'].leftMargin
f['Hbar'].rightMargin = f['H'].rightMargin

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.

ReginaldV's picture

So I need to copy this script into Robofab ? - where would I put the script ?

Syndicate content Syndicate content