Reputation: 47
I'm using ftgles library on android native app.
but i can't rendering a text.
this is my source code.
unsigned char* buff;
unsigned long size;
buff = GLManager::getInstance()->texture()->loadFontFromAssets("NanumGothic.ttf", &size);
font = new FTBufferFont(buff, size);
I think this code is wrong.
so I'm trying to
change this code
font = new FTBufferFont(buff, size);
to
font = new FTBufferFont("filePath");
but I don't know the absolute path of assets folder's file
could you teach me how to get assets folder's file absolute path?
Upvotes: 2
Views: 460
Reputation: 57173
Assets are not files, and you cannot use fopen() for them, which FTBufferFont(const char*) does under the hood. But you can extract an asset to a regular file if you wish, especially if you need this for debugging your code.
Upvotes: 1