Is there a way to adjust the spacing (tracking) of an entire font - for example reduce spacing by 20% removes 20% from each side bearing value on each glyph to essential track the typeface tighter by default, and not need to manual track in end application?
I recommend writing a python script for that!
Wouldn’t know how to!
Why not use the
Transformations filter? It’s built-in.
You can even apply it as a Custom Parameter so it only takes effect on export (if you wish).
I had originally thought of that but it doesn’t seem to do % calculations on metrics, it only adds a set value to what is there, or replaces the metrics value entirely. I want to percentage scale down all side bearings across every glyph - so a value of lets say 20, gets replaced by 15 if multiplied by 75%.
I’ve found a script from the scripts page that does this, but just looking how to install - says requires vanilla - not familiar with this.
Go to Glyphs Preferences > Addons > Modules and click
yes - thanks - i found this info on on another question by searching
got the script working but it doesn’t handle negative numbers correctly
reduce -26 by 33% calculates as -18, but in fact that is increasing the spacing - the correct calculated value should be -39
If you want to emulate tracking then it is best not to use percentages but to use the Transformations filter with fixed values, as Mark pointed before.
You want to reduce spacing by 33%. Here’s what I would do. Let’s assume these sidebearings:
n = 80
o = 50
f = -10
I would calculate 33% of the sidebearing of
n, which in this case would be 26,4 (let’s round it to 26). Then, I would subtract 26 from all sidebearings in the font, resulting in:
n = 54
o = 24
f = -36
Working with percentages is tricky in type design because measurements vary so much. If you want to reduce metrics by a percentage, you can’t simply apply it font-wide. As a matter of fact, the tracking you apply on other software uses upm as the unit, not percent.
Can I ask why you specified the letters n, o and f?
I’m not sure just taking off a fixed amount off each value is the right thing to do, surely this will tighten up some spacing more than others - for example say a letter with -20 on LSB and 40 on RSB, taking a fixed 15 off both will surely cause the LSB to be too tight?
Problem I have is the font i am working on doesn’t cross reference the glyph metrics from each other - i.e., B uses the value of left side of H, etc
n o f are only for example. Also this is an example of IF you want to imitate tracking
Adjusting metrics by adding/subtracting has an advantage and disadvantage, just as multiplication does but in opposite direction. You are never sure how to interpret negative values, and glyphs with wide sidebearings will receive much greater effect than expected. Proportional change may be better for certain cases, but at the same time you’re making it worse for opposite cases.
hmmmmmm yes I am learning this - no perfect solution here - % works best for some glyphs, but absolute works better for others
As Tosche said, they are only examples. To be more specific, I picked
o because their sidebearings are usually quite symmetrical and serve as base for all spacing. The
f is an example of a letter with a negative sidebearing (the right one).
Not really. Assuming the sidebearings of -20 LSB and 40 RSB work well within all combinations of characters in the font, if you take 15 off either side the spacing will be tight on both sides, but it’d still be somewhat balanced. You’ll probably need to make some adjustments, though.
To chime in as well: From personal experience, I strongly recommend using fixed values, as it is possible in the Transformations filter. I do not understand the reasoning behind percentages. But you can try yourself with te script from my
No. And that is exactly the problem. 67% of -26 is -18. -39 is 150% of -26. OK so you want to increase negative spacings by 50% and decrease positive spacings by 33%. What’s complicating it more, do different increments for wide (dozens of units) and narrow spacings (hardly any units), and what do you want to do with zero spacings? No changes? Now, I cannot exclude that this might work for certain designs, but I have yet to see such a design. I would bet money that this approach will turn a working spacing into an unrhythmic one.
In short: If you want more whitespace between your letters, add a fixed value to all sidebearings, if you want less, then subtract a fixed value. Been there, done that, works. But I am happy to be proven wrong.
Yes i have come to this conclusion. Gone the fixed value route with some tweaks here and there.