Fix OTS warning about `maxp.maxSizeOfInstructions`.master
commit87a4ebfb82bede3321aca79b256b7f96fc879f18
authorKhaled Hosny <khaled@aliftype.com>
Thu, 24 Nov 2022 16:15:48 +0000 (24 18:15 +0200)
committerWerner Lemberg <wl@gnu.org>
Fri, 25 Nov 2022 06:31:07 +0000 (25 07:31 +0100)
treee742e7866c2e03813c19b62120e7012451955317
parent41a5038aa52e6b34862d1661c83b9743435b7eb0
Fix OTS warning about `maxp.maxSizeOfInstructions`.

For some fonts, OTS gives the following warning:

```
WARNING: glyf: Bytecode length is bigger than maxp.maxSizeOfInstructions 17696: 17700
```

In the 'glyf' table, the glyph's `instructionLength` value is set to
`ins_extra_len + ins_len`, but when updating `sfnt->max_instructions`, only
`ins_len` is considered.

Fix this by taking `ins_extra_len` into account when updating
`max_instructions`.
lib/tabytecode.c