google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.22k stars 2.62k forks source link

Update Wavefont #6703

Closed RosaWagner closed 1 year ago

RosaWagner commented 1 year ago

Font Project Git Repo URL: https://github.com/dy/wavefont

Current version: 3.004

New available version: 3.005

Super short description of the upgrade: ~Addition of a WIDHT axis~ expanded weight axis' range and remap values

dy commented 1 year ago

Width axis wasn't added eventually. It's only linearized weight axis & expanded its range. Npm version is new, it's injected as font version, so it must be new already, 3.4.0

RosaWagner commented 1 year ago

@dy the font version (in the name table) in your repo is still 3.004

dy commented 1 year ago

Got it. Bumped

RosaWagner commented 1 year ago

@dy while reviewing my PR, my colleague @vv-monsalve asked why not mapping 20 to 1 to have an Hairline instance in the STAT table. I want to be sure my suggestion in https://github.com/dy/wavefont/pull/60 was not overlooked, are you sure you want to keep the minimal range at 20? It's okay if you don't want, but I'd like to confirm before merging.

dy commented 1 year ago

with default at 100 it's safe to extend to hairline indeed. The main limitation is compatibility with linefont, but maybe I should introduce default at 100 there too. I guess @vv-monsalve is right, I'll try hairline

RosaWagner commented 1 year ago

yes the default at 100 is also expected for Linefont

vv-monsalve commented 1 year ago

Excellent @dy, thank you!

dy commented 1 year ago

Ok, just experimented with weight=1 value, and there's multiple limitations making it not feasible.

That reduces the worth of hairline style.

The premise about the wavefont/linefont is that they're not intended for rendering precise data, since they have only 127 values. Besides, rendering too much data with wght=1 is not performant and creates visual artifacts. Min value of wght=20 is more-or-less meaningful limitation in terms of healthy font usage, it seems reasonable to keep it.

RosaWagner commented 1 year ago

We were proposing to map this way: <map input="1" output="20"/>, is that problematic?

dy commented 1 year ago

This creates non-linearity, since mapping is a factor of 4. The furthest I can safely get is <map input="4" output="1">, but that doesn't reach hairline-style instance. Should I proceed with that?

RosaWagner commented 1 year ago

I reversed the value above so I edited my comment.

Honestly we are not picky on what a hairline style should look like. We just suggest a way to have the minimum range in the STAT table for future update of the API that could generate an instance for it in the future. If your user value (input) is 1, you choose whatever design value (output) you think would fit.

dy commented 1 year ago

Ah, ok. So should I add hairline instance in designspace then? I've expanded axis to wght=4

RosaWagner commented 1 year ago

Only in the STAT table, so in the config.yaml

dy commented 1 year ago

Ok, added