Latest Game

Versatile Bitmapfonts

by Stefan Schwarzien 4. January 2010 12:39

The last couple of weeks i have worked (on and off) on a system that implements .TTF fonts as bitmap (one to several .png files, depending on the font size) including an .xml file for info on character kerning and texture coordinates, so it can be used on any platform without being dependant on ttf support.

To generate a new font, you simply have to pass the font name (the .TTF font must exist in your system for the generation only), and the desired size.

 

Font Arial = new Font("Arial", 12.5f);

 

The font can then be rendered in any color, anywhere on screen.

Arial.Write(120, 20, "Text");
Arial.WriteCentered(250, 120, "Text is a nice text");

The latter function centers the text around the point given.

The latest addition i made is rotated text, so it works on either portrait or landscape layout.

Arial.Write(120, 20, "Text", 90);

However, the rotation can be anywhere between 0 and 360 degree.

 

Currently, each character is drawn dynamically, but it is planned to add a render to texture function, so we can draw static strings as a single sprite.

 

Of course, this is actually animated, rotating like it never could before.

Comments


1/18/2010 3:35:42 PM #

Sib Font Editor is a font-creation solution required to design quality bitmap fonts. It satisfies the needs of typographers and graphic designers as well as beginners. Its easy-to-use interface and intuitive mouse-based controls come along with a number of powerful features.

Bryan Nash | Reply



1/29/2010 8:48:34 PM #

There are three things that you should spend you time doing: Marketing, marketing, marketing.

faxless cash advance | Reply



2/8/2010 7:13:45 AM #

It's always nice when you can not only be informed, but also entertained!

SEO Services India | Reply



3/11/2010 1:11:42 AM #

Interesting post and I really like your take on the issue. I now have a clear idea on what this matter is all about. Thank you so much.

arac sorgulama | Reply


Add comment




biuquote
  • Comment
  • Preview
Loading



Disclaimer: The opinions expressed in this blog are own personal opinions and do not represent the companies view.
© 2000-2010 exDream GmbH & MobileBits GmbH. All rights reserved. Legal/Impressum

Recent Games

Fireburst

ArenaWars Reloaded

Jobs @ exDream

Current Poll

Do you know what the Delta Engine is?



Show Results Poll Archive

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234