Issue with components shifting when adjusting sidebearings by percentages

Hey everyone,

I’m having an issue with non-auto-aligned components when adjusting sidebearings (LSB/RSB) by a percentage. If a glyph has multiple components (like adieresis), the components don’t move together. Instead, one shifts properly, but the other moves incorrectly, breaking their alignment.

I’ve tried tracking component positions before the shift and reapplying the delta after, but it only works when there’s a single component. I also tested the mekkablue “Change Sidebearings by Percentage” script, but it has the same issue.

Does anyone know a good way to ensure that all non-auto-aligned components stay grouped and move properly when adjusting sidebearings?

Thanks in advance!

Anatole

What exactly do you mean?

can you show your component setup. And why don’t you use alignment?

Hi,

I should’ve explained better. I need to change the overall spacing of the font by a certain percentage. I made a script for it with a custom interface, but I realized that it’s very hard to apply the spacing changes to glyphs composed of non-aligned components.

The font doesn’t use auto-alignment because it was built without anchors for certain reasons, so everything is placed manually.

The problem is that when I run my script (and mekkablue’s one too), it works fine on decomposed glyphs. But as soon as it touches components, one of the components moves incorrectly while the others stay in place.

the problem is that you apply the spacing to the base glyphs (what shifts the components) and the composite glyphs, too. And as the side-bearings are different in the letters and the marks, they shift differently.

I don’t think there is a save way to do that properly.

And I don’t think it is particular helpful to change the spacing by percentage. Because it will reduce the spacing for some glyphs quite a bit (for those with big side-bearings (like “i”)) and will increase the spacing for glyphs with negative side-bearings (e.g. the right side of “f”).

It is usually much better to adjust by a certain absolute value. And you need to adjust it manually anyway.