Hi experts, I am developing a program drawing text on screen using android NDK in C native code. Could you please tell me how do I render the text? Thank you.
Best regards Michael
Hi experts, I am developing a program drawing text on screen using android NDK in C native code. Could you please tell me how do I render the text? Thank you.
Best regards Michael
The NDK currently does not offer drawing capabilities beyond OpenGL.
I've barely worked with Android, and nothing with the NDK, so this may be talking out of my ***, but depending on the app, and if performance isn't a concern, could you generate a bitmap in the C code and pass it up to the parent Java app to display?
You'll need to use a C-based text rendering library such as Pango.
As Graham already said Pango is an option or if you are willing to do some more work you can also use the freetype library directly to render glyphs. Using freetype directly has the advantage that you only have freetype as dependency.