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
[varLib] Add avarPlanner #3223
[varLib] Add avarPlanner #3223
Conversation
I have to generate waterfalls and observe whether the generated output makes visual sense. |
a9bf16f
to
3a4c1ab
Compare
Consider glyph width.
No cmdline support yet.
cc @twardoch |
For reference: https://www.diacritics.club/family-steps |
Can you clarify what this is doing? Have you implemented Lucas and Pablo curves as HOI in avar2? (which would be a fabulous new use case) |
No. It's just avar1. It's an alternative to Lucas & Pablo curves. I think it produces better results than those. It works by calculating the font's gray "color" using fontTools areaPen, and then treating the weight as log-linear in the gray color. |
What's curious is that @LucasFonts has the right idea that the stem-widths (in his case) / blackness (in my case) should be proportionally the same across adjacent weights: https://www.lucasfonts.com/learn/interpolation-theory That cleanly maps to a exponential function though. I'm not sure why he didn't arrive at that and arrived at a more complicated formula there. |
As my tweets may not be visible to anyone not logged in, this is the code linked in the tweet: https://gist.github.com/jenskutilek/f328f2ca250e8b9ebad0fb398a5a64c1 |
Can we see that waterfall at target sizes and, more importantly, the individual text size targeting from 8–16pt? |
This looks promising, but I will need to find some time to play with it with a better opsz test font. This sans serif is pretty tightly spaced even at its smallest size. I’ll look around for a more traditional text face in which the spacing between 6pt and 10pt changes more significantly. |
I would like to test it on an opsz thing I have on my desk but can not share. |
Sure. With fonttools main branch, do:
Let us know how it goes! |
Shouldn’t this be calibrated against a corpus of Regular and Bold fonts, Regular and Condensed fonts, etc? |
From my cursory look around, the actual weights of Regular/Bold and their ratio varies widely across families (specially when you look across different scripts). So the tool cannot suggest any absolute numbers for those. Instead it logarithmically interpolates between Regular/Black to suggest where Bold should be perceptually. Given Blacks I've seen, this undershoots the designer-set Bold. That is, there's just not enough variance between most Bold and Blacks. The difference is not as pronounced as Regular to Bold. |
Could you please explain the curve and are you calculating the gray 'color' using a key glyph? |
From what I wrote on Twitter: I think it's first good to review this: https://diacritics.club/family-steps My method is closer to Luc(as)'s. Except that it uses actual ink area instead of adjusting the stem widths only. I think it's first good to review this: https://diacritics.club/family-steps In my understanding, you are suggesting the linear progression. My method is closer to Luc(as)'s. Except that it uses actual ink area instead of adjusting the stem widths only. The way it works is that it first samples the weight axis at a few points (8; doesn't matter) to build a function of from the axis value to the actual ink percentage on the page. This is done using the After that, it inserts the requested number of in-betweens, such that the ratio of ink between successive ones are the same. That is, it produces a geometric progression of the ink percentage.
I'm calculating the color from the entire glyphset. |
Currently deduces "correct" weight axis mapping based on glyph average weights of axis min/default/max.
EDIT: Plans width and slant axes now too.