0

I have created a demo font which I haven't been able to get working yet, running into this Browser error when I try to load it in the browser:

OTS parsing error: incorrect entrySelector for table directory

Specifically, this is an OpenType (or perhaps TrueType) font, not sure which one I chose fully yet. But that field entrySelector can be found on this Apple docs page, and this Microsoft cmap page, and also their OpenType font page. That's pretty much it. I've double and triple checked that I am setting the values according to the spec but it won't get fixed. So all I can think of now is to start inspecting the memory layout of the bits and see what could be going wrong. That's what this question is about: How to debug (any arbitrary program) on a Mac in the Terminal using just the binary and a hex viewer pretty much.

I've linked to a hexdump output of one of the older versions of the font to start. I would now like to somehow dig deeper into this so I can start inspecting the values in specific places in memory. For example, I could check all of the variables used in the calculation of entrySelector, and see what their values are stored in memory. Then try computing the value and see if it's the same. Stuff like that.

But I don't know where to begin with it. Without installing any other programs than just the hexdump I already have (ideally at least), I'm wondering what are some first steps I can take to debug this using the hex viewer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.