On 4/9/22 00:26, Esme Povirk wrote:
- if (GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0)
if ((GET_BE_WORD(header->major_version) != 1 || GET_BE_WORD(header->minor_version) != 0)
&& (GET_BE_WORD(header->major_version) != 0x4f54 || GET_BE_WORD(header->minor_version) != 0x544f)) return NULL; pos = sizeof(*header);
This field is specified as uint32 [1], that also makes it more obvious that this is checking for OTTO marker.
[1] https://docs.microsoft.com/en-us/typography/opentype/spec/otff#table-directo...