Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More handy width/side-bearings customization #1181

Closed
ghost opened this issue Jul 30, 2021 · 3 comments
Closed

More handy width/side-bearings customization #1181

ghost opened this issue Jul 30, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2021

Is your feature request related to a problem? Please describe.
For now in custom builds there is no way to automatically build regular and extended width variants of font with the same glyph sizes because side bearing parameter is not a proportion but an exact value. So every build you have to manually adjust parameters by yourself.

Describe the solution you'd like
Adding proportional side-bearing parameter while keeping standard one. Proportional value should override standard if set.

Describe alternatives you've considered
Ability to set side-bearing value for each specified width separately. Moving sb parameter from metric to width block.

Additional context
By the way can anyone explain me how the emu unit works? Especially with sb parameter. I thought I will be able to get the same glyph size on extended 600em width by multiplying sb with 1.2 but it didn't worked and so I have to set the value approximately.

@be5invis
Copy link
Owner

There's already a mechanism to use a scale in metric-override (as well as using an offset):

[buildPlans.iosevka-custom.metric-override.multiplies]
sb = 1.0625

[buildPlans.iosevka-custom.metric-override.adds]
sb = 15

@ghost
Copy link
Author

ghost commented Jul 30, 2021

@be5invis and again it just works thank you for your patience. But I still wonder why manual value multiplication didn't work the same way?

be5invis added a commit that referenced this issue Jul 31, 2021
…erride.multiplies]` and `[metric-override.adds]` are no longer supported (#1181).
@be5invis
Copy link
Owner

Let me introduce expression-style metric override. Now, you can do this:

[buildPlans.iosevka-custom.metric-override]
sb = 'blend(width, [500, 60], [600, 110])'

This configuration will set sidebearing to 60 when width is at 500, and to 110 when width is at 600.

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant