googlefonts / googlefonts/gftools
potential varLib bug in instantiation
- Dominant language
- Python
- Stars
- 283
- Forks
- 73
- Avg merge
- 21h 25m
- Merged PRs (30d)
- 8
Description
(@anthrotype [suggested](https://github.com/laerm0/opensans/issues/17) I file a bug)
When instantiating from a VTT-autohinted font, the composite autohints become broken.
Here's the variable font with its good composite low-level hint code:
```
/* VTTTalk Unicode 0xc9 */
/* ACT generated Thu Jun 20 15:25:27 2019 */
USEMYMETRICS[]
OFFSET[R], 38, 0, 0
OFFSET[R], 971, 435, 375
CALL[], 21, 22, 88
SVTCA[Y]
CALL[], 12, 0, 0, 0, 1616, 86
SHC[2], 1
CALL[], 9
CALL[], 12, 13, 11, 30, 10, 87
SVTCA[X]
SHC[2], 1
```

Here's an instance at an axis maximum:

You can see that the extra-bold, the second glyph, is incorrect. It uses the same low-level hint code as the default instance.
I'll explain what the pertinent parts of the hint code are doing so you can see where the adjustments would have to be made.
`USEMYMETRICS[]`
means this is a composite and I am specifying metrics
`OFFSET[R], z, x, y`
z = GID, x = X offset, y = Y offset
`CALL[], 12, 13, 11, 30, 10, 87`
Function call 87 centers an accent over a base. It is centering points 12 and 13 between points 11 and 10 with an offset of 30.
# whoa
I'm keeping this here so I don't lose my work and in case I do need it, but, as noted at https://github.com/laerm0/opensans/issues/17#issuecomment-507716129, I'm pretty sure the error is on Microsoft's end. I'm contacting them and will return to this if I need to. I am going to close as soon as I file this and re-open down the road if necessary.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.