Font to Coordinates


How can I get the coordinates of the output of a truetype font. I need to write a function like so:

struct CartesianCoord{float x,float y};
CartesionCoord *printfont(const char *filename,char ch, int &len)
    /*Read the font in filename.ttf and convert it to a set of vertices describing the resulting shape. Do this for the letter 'ch' and return an array of coordinates describing it. len stores the length of this returned array.*/

I think I need to know more about .ttf file formats but I do not know where to begin! (Yes I have tried googling it)

Featured Replies in this Discussion


Start here


Thank you!

Question Answered as of 3 Years Ago by dexblack
Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

This question has already been solved: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: