Display text in a regular Android application

I have a purely native NDK application for Android, and you need to display the text in each frame. I read the posts saying that I need to create one image file with all the characters in my font, and then display each character as a square from this image. That sounds like a lot of work, and I don’t know where to get such an image file for a simple font like Arial. Is there an alternative, simpler approach to drawing text in a purely native Android application?

Or, where can I get such an image file to make my own font rendering?

+5
source share
1 answer

You might want to see if the font renderer can be integrated into your application. FreeType is a popular one that is written in pure C with no external dependencies that make it easy to use. OGLFT is a version of FreeType that displays OpenGL. I would do a little more research to see if there are alternatives that might be better, but they seem pretty good.

This seems to be even better.

+4
source

All Articles