Options

OTS parsing error: Unable to instantiate font face from font data

I have this data going into computing my [`cmap`](https://docs.microsoft.com/en-us/typography/opentype/spec/cmap) table: file 1.txt.

The overall font file that gets generated is this: file 2.txt

Wondering if in that first JSON, everything looks good / conforms to the  spec. I am essentially just concatenating the decimal values from that JSON and then putting it into a Buffer and writing it to the file, so if that is accurate the final result should be accurate.

Not sure if the 255 values are correct yet, but otherwise I can't see anything that would make it incorrect yet. Wondering if you can find anything.

If I make a slight change in certain places, then I get:

    OTS parsing error: cmap: Failed to parse table

But otherwise get:

    OTS parsing error: cmap: Failed to serialize table

Not sure which one is closer or further from working.

If I change these two:

    platformID: { type: 'USHORT', value: 3 },
    encodingID: { type: 'USHORT', value: 1 },

I get:

    OTS parsing error: Unable to instantiate font face from font data.
Tagged:

Comments

Sign In or Register to comment.