Jump to content

  • Log In with Google      Sign In   
  • Create Account


TTF Font Libraries?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 blueshogun96   Crossbones+   -  Reputation: 799

Like
0Likes
Like

Posted 03 May 2013 - 09:13 AM

In your opinion, what do you think is the most feasible library to use when rendering TTF fonts in OpenGL... in regards to cross platform development? My current project is in need of a TTF font library that's portable to Windows, Mac, *NIX, iOS, Android, etc. and right now, I primarily use MacOSX for development purposes.

 

My initial thought was to stick with SDL_ttf, but I don't know whether that requires your application to use SDL for gfx or not.  My game doesn't use SDL (this time, and was hoping to keep it that way for my own personal reasons).  Why do I want to use TTF fonts?  Because Segoe is not a native font to non-Windows platforms.  I guess I could always use Frutiger instead if necessary.  What do you think?

 

Shogun.


Follow Shogun3D on the official website: http://shogun3d.net

 

blogger.png twitter.png tumblr_32.png facebook.png


Sponsor:

#2 Martins Mozeiko   Crossbones+   -  Reputation: 1413

Like
0Likes
Like

Posted 03 May 2013 - 09:36 AM

Yes, SDL_ttf depends on SDL library.

 

Try this one: https://code.google.com/p/freetype-gl/

It depends only on freetype2 for ttf rasterization.

It works on all three desktop OS just fine. And for Android or iOS it should work with minimal changes for renderer (last time I checked they used desktop GL, not GL ES one).



#3 blueshogun96   Crossbones+   -  Reputation: 799

Like
0Likes
Like

Posted 03 May 2013 - 04:19 PM

I looked into freetype, but since it uses the programmable pipeline, I can't use it for iOS since I only have an iPhone 3G right now.  It will be some time until I get an OGL ES 2.0 device in my hands.

 

In the mean time, I can easily use it for other OSes.


Follow Shogun3D on the official website: http://shogun3d.net

 

blogger.png twitter.png tumblr_32.png facebook.png


#4 Nairou   Members   -  Reputation: 418

Like
0Likes
Like

Posted 04 May 2013 - 09:54 AM

I use freetype (the original, not freetype-gl), and rasterize my fonts to a texture when my game start up. Then to draw text on the screen, I just generate quads with the font texture, one character at a time. Doesn't require anything special, and works on all platforms.



#5 blueshogun96   Crossbones+   -  Reputation: 799

Like
0Likes
Like

Posted 05 May 2013 - 05:12 PM

Oops, silly me.  I was thinking of freetype-gl.  Freetype itself is API independent.

 

Anyway, I also found this: http://nothings.org/stb/stb_truetype.h

 

Doesn't require any special libraries and appears to be portable to all OSes.  I haven't tried it yet because I couldn't focus on code last night.

 

Shogun.


Follow Shogun3D on the official website: http://shogun3d.net

 

blogger.png twitter.png tumblr_32.png facebook.png





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS