Author Topic: How to draw text ?  (Read 4192 times)

Offline Gnurfos

  • byte
  • *
  • Posts: 3
    • View Profile
How to draw text ?
« on: December 12, 2010, 03:30:10 pm »
Hi,

Is there a simple way to draw a text ?

Thanks

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to draw text ?
« Reply #1 on: December 12, 2010, 09:45:23 pm »
If the text is static, use a texture and blit it using the methods in FrameBuffer. If it's dynamic, you can either use the same approach but blit single characters or simply use raft's classes for this (which is what i recommend), that can be found here: http://www.jpct.net/forum2/index.php/topic,1074.0.html

Offline Gnurfos

  • byte
  • *
  • Posts: 3
    • View Profile
Re: How to draw text ?
« Reply #2 on: December 13, 2010, 07:52:28 am »
Thanks for your reply.
However, I am working on the Android version (and posted on the wrong forum, hum). Will this still work ? I see it uses awt.
Are there plans to include such a feature in the main engine ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to draw text ?
« Reply #3 on: December 13, 2010, 10:10:53 am »
It's available for Android too. Just have a look in the Android section...it can be found there somewhere.

Offline Gnurfos

  • byte
  • *
  • Posts: 3
    • View Profile
Re: How to draw text ?
« Reply #4 on: December 13, 2010, 10:57:06 pm »
Thanks I found it.
And it works great. Why don't you include it in the main engine ? This seems like a basic feature.