Pango with OpenGL on Android (and desktop linux)



Hi Pango people,

I made a game for Android[1] with a friend this summer -- I wrote a minimal UI toolkit that draws with OpenGL directly. I struggled for a while on text (Android doesn't give you access to the shaped glyphs and offsets) before building Pango and its dependencies for Android and writing a new renderer that emits geometry and a glyph cache suitable for use with OpenGL.

My code (as well as a script to build pango et al with NDK) is available here:

  https://github.com/iamralpht/letterplex

I don't have any examples of usage in there yet, but I'm happy to add some if there's any interest. It uses the freetype backend, so doesn't depend on Cairo. It supports colored text, but doesn't yet implement rect drawing (so no backgrounds, underlines or strikethroughs).

I was incredibly grateful to be able to get nice looking text without too much work. My library links against a regular build of pango (that's what the Makefile does) so if there's interest in making a traditionally packaged library out of it, or integrating it into pango proper then I'd like to help facilitate that.

Thanks!
Ralph

[1]: https://play.google.com/store/apps/details?id=com.infinite_imagination.letterplex



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]