googlefonts / googlefonts/fontmake

Wrong yScale interpolation in variable TTF font

Open
#741 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

[Wavefont](https://github.com/a-vis/wavefont/tree/radius-caps) experiment, each bar consists of 3 components:
* top cap
![image](https://user-images.githubusercontent.com/300067/109401473-00d67800-791d-11eb-9ce0-ca53e5872754.png)
* bottom cap
![image](https://user-images.githubusercontent.com/300067/109401481-1350b180-791d-11eb-94ec-770b0e081ad1.png)
* value bar
![image](https://user-images.githubusercontent.com/300067/109401495-206da080-791d-11eb-95ef-372fe5819b9e.png)

Value bar template is simple 100% height rectangle:
```glif












```
, that is inserted in glyphs and scaled down via `yScale`.

Glyph template is the following:
```glif






```

afdko renders variable OTF the right way:
![image](https://user-images.githubusercontent.com/300067/109401623-b6093000-791d-11eb-9755-2dc83439a230.png)

but fontmake creates artifacts (bar height is more than needed due to wrong interpolation):
![image](https://user-images.githubusercontent.com/300067/109401653-e05aed80-791d-11eb-8f41-e2fddef4e0d8.png)

It looks like it happens due to reverse interpolation of `yScale` between masters.

Minimal `designspace` setup is here:

[yScale-artifacts.zip](https://github.com/googlefonts/fontmake/files/6055629/yScale-artifacts.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.