ncite
ncite

Reputation: 563

Is there an easy way to display bitmap fonts (like .fon) in C#

Currently I am implementing a graphic editor project using C#, my project should to have ability to display bitmap font. I plan to write a COM component in VC++ and send bitmap font as bitmap array to C# and implement a string render class. However my project leader thinks that the method will take to much time and want a easier solution. unfortunately, I don't know any project which implements bitmap font for .net framework and GUI+. What do you guys think? Thank you!

Upvotes: 2

Views: 827

Answers (1)

Tergiver
Tergiver

Reputation: 14517

It isn't terribly difficult to create a MeasureString and DrawString that works off of a series of bitmaps (or a single bitmap). It is definately time-consuming, but doesn't require advanced knowledge or intellect. Basically all you need to know is Graphics.DrawImage (for GDI+).

There is nothing in the .NET Framework to simplify this, but XNA does. XNA might not be appropriate, but it's worth having a look at. Check out http://creators.xna.com/en-US/. XNA uses the concept of "sprites" (which is nothing more than bitmaps) and a SpriteFont that is used to display text as a series of sprites.

Upvotes: 1

Related Questions