Copy to Composites Macro - RoboFab ?

ReginaldV
3.Jun.2008 10.01am
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 :

#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.



Miguel Sousa
3.Jun.2008 11.25am
Miguel Sousa's picture

ReginaldV
3.Jun.2008 12.55pm
ReginaldV's picture

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