Copy side bearings

H_Afash's picture

Is there any Python script to copy the two sidebearings and width from base glyphs to their components?

riccard0's picture

I think the Build section of the forum would be a better place where to ask it.

kentlew's picture

You can do this in FontLab with the Paste Special command. Select the base glyph in the font window and Copy. Then select all the component glyphs and select Edit > Paste Special and choose Left Sidebearing, Right Sidebearing, and Adv. Width from the dialog.

Note: you may want to check the Use Measurement Line While Copying Sidebearings option at the bottom if you have diacritics that extend horizontally beyond the base glyph (and set your measurement line somewhere in a “safe” zone beforehand, obviously).

Of course, if you have a large number of glyphs that you want to operate upon, then a Python script will work better, and I’m sure someone has probably written one.

satya's picture

I'm sure there are scripts to automate this task, but here is a manual way to do this:
Select the component, right click and chose "Copy Metrics". Done.

Note: This is only helpful if there is just one component in each cell.

Syndicate content Syndicate content