开发者

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 g开发者_运维知识库uys think? Thank you!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜