BlockLeftTop, PRELOAD BlockLeftBottom, PRELOAD BlockLeftStretch, PRELOAD BlockTop, PRELOAD BlockBottom, PRELOAD BlockStretch, PRELOAD BlockRightTop, PRELOAD BlockRightBottom, PRELOAD BlockRightStretch, PRELOAD
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



4/18/2010 5:44:50 PM #

Awesome stuff you guys got here.  I really like the theme of the website and how well you organized the content.  It's a marvelous job I will come back and check you out sometime.

us | Reply



4/22/2010 3:41:51 AM #

one day i went shopping outside,and in an ed hardy store,I found some kinds of ed hardy i love most they are Your website is really good Thank you for the information

ed hardy | Reply



4/23/2010 1:43:37 AM #

What a comprehensive and interesting blog. Really nice to read it. Please include more details if possible.

disc player | Reply



4/28/2010 1:23:12 AM #

I\'m happy I found this blog, I couldnt discover any info on this subject matter prior to. I also run a site and if you want to ever serious in a little bit of guest writing for me if possible feel free to let me know, i\'m always look for people to check out my site. Please stop by and leave a comment sometime!

Rapidshare | Reply



5/4/2010 5:18:41 PM #

Top Rapidshare Search engine

Rapidshare Search engine | 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

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Blogs

Download OPML file OPML