I would like to use also text in my current program,
so I downloaded the TTF library.
Unfortunality I must give a valid path for my font file, this is a problem,
because there a good chances that the users will only copy the binary executable file,
and not the specific path where is located the font file.
I tried this:
$ cat my_prog david.ttf > my_new_prog
And then I toke the example program showfont:
$ showfont -solid ./my_new_prog
It didn’t worked, he doesn’t parse the file to find a right font.
It’s not the best method, but if this worked, I could load my font by doing this:
int main(int ac, char **av)
But I think the best would be if it could be possible to load it directly from memory, and to
convert the font ttf file to a C file, and to have a new interface as like:
TTF_Font* TTF_OpenFont_raw( const unsigned char *raw_data, int ptsize );
Personnally I think programs are more portable if all files are together in one executable file,
but I don’t know what the professionals would say about that. :-)–
saf at trashmail.net
Free disposable email addresses.