PDA

View Full Version : Unable to Render Font



way_Ahead
02-11-2013, 10:11 PM
Hello Everyone,

I,m working on a project involving OPEN GL ES 2.0 & in my project I,ve to render the fonts as like whenever I enter any text it should appear on Screen at particular location.I am not able to find any such method ..

thokra
02-12-2013, 02:26 AM
No such thing in OpenGL/ES. When trying to render fonts you're on your own. The only thing you can render is a final texture containing the rasterized glyphs produces by some font renderer, like Pango(in conjunction with Cairo) or FreeType. The bitmaps these renderers spit out can then be used as data for setting up a texture object and render it to a screen aligned quad and blend it with the contents of your back-buffer or FBO.

Here's some links you might find interesting:

http://code.google.com/p/freetype-gl/
http://www.cairographics.org/OpenGL/

I can't offer you any platform specific hints. The above libs will work cross-platform on desktop PCs, i.e. definitely on Windows and Linux. They have also been ported to Android and at least FreeType is also available on iOS. HTH.

tonyo_au
02-12-2013, 04:31 AM
There is a good chance this will work as well
http://www.angelcode.com/products/bmfont/

thokra
02-12-2013, 04:46 AM
Thx tonyo, didn't know that tool! Looks awesome.

starsun
02-16-2013, 04:38 AM
I have the same problem , thanks for answers .
I'm beginner too , and it's so good that can find answer to my questions here .
Thanks .