Having issues working on a template - variable values don't seem consistent

I have just bought the product and I am very impressed. I’m working to develop font reading software and as a result I’m working with the TTF.bt to expand its capabilities. You can find my source files here. I’m working on lines 325-376 to try and add the COLR table.

I find that by the time I get to line 372, the actual and desired variables do not match. I found that I had to add the local quad’s for debugging because some of the variables lost their values as I was trying to debug and became undefined.

I freely admit that I am a newbie here. Perhaps there is a better way to achieve the offsets that I need. But this seems to work down to that last SetCursorPos. Also take into account that I realize as the script is it wouldn’t necessarily work with any other file. As I said, I’m just learning how the system works here.

Any help is appreciated.

We tried to access your data files but I believe you have to authorize us to be able to see them. You may want to look in the 010 Editor Output window and see if there are any warnings displayed when running the template. I’m guessing that you are missing an <optimize=false> somewhere in your code but it’s hard to say for sure without seeing the code. Cheers!

Graeme
SweetScape Software

We got access to your code. Inside struct tcolr, instead of calling the function ‘SetCursorPos’ you should be calling the function ‘FSeek’ instead. SetCursorPos just moves the cursor around the file but you want to change the current read position with FSeek. Let us know if this doesn’t fix your issue. Cheers!

Graeme
SweetScape Software