tatman blue

Im a new to XNA so please be patient with me.

I'm feeling really frustrated trying to get my own fonts to draw on the screen.  Ive found classes that will take their example image and draw with those fonts.  But I dont want those fonts.  I want mine.  I know that I have to have an image with my letters of my font on it. And that image has to get parsed. Im trying to avoid having to create my own classes and tools to do this.

So I downloaded the Bitmap font generater from Angle code. The classes I've found, both here in these forums and at angle code,  that suppose to work with this Angel code tool do not correctly parse the .fnt. At first I was getting exceptions. So I debugged through it and got passed that. But its not drawing a damn thing on the screen.

So I found some other class that wants the .fnt file in XML format. Ok. Angle code tool generates XML .fnt files but the XML is not the same that this class wants.

So quite frankly I am very frustated. Is there a tool and classes out there that work that I dont have to spend time debugging, refactoring, or what not! this seems insane that I cannot find something as common as this to use.....

any help would be so very much appreciated...

thnx
Matt




Re: XNA Framework Font troubles

Jim Perry

If you want to use your own fonts, you can't really expect to find something generic that works or someting that works with specific fonts. Is there a reason why you can't use one of the Windows fonts and use the existing code that's out there (that works perfectly BTW).




Re: XNA Framework Font troubles

tatman blue

by my own fonts I meant fonts from the standard windows collection. like my current project I would like lucida. But as said, I cant find a class that works with the data generated by the Angle code tool.

M




Re: XNA Framework Font troubles

Jim Perry

Clicky




Re: XNA Framework Font troubles

tatman blue

thnx. Ive seen this link before. but where is the XNAfont class shown in the example




Re: XNA Framework Font troubles

Jim Perry

No idea, you'll have to contact the author.




Re: XNA Framework Font troubles

ProfEclipse

It's included in the sample download available at the bottom of the page. The XNAFont class is defined in Game1.cs.





Re: XNA Framework Font troubles

tatman blue

Downloaded the ziggy font creator tool. there is not font class there.

I downloaded the xna-simplefont-tutorial and it shows how to display texts using a font but there is no tool included to create a font.

why is this so #%$$# hard cant this be simple




Re: XNA Framework Font troubles

andyfraser

As ProfEclipse says, If you download the code from the link at the bottom of ziggy's page and extract it to a directory, you will find the XNAFont class in game1.cs. You can then cut this class out and use it in your own game.

HTH

Andy





Re: XNA Framework Font troubles

dczraptor

I'm surprised that nobody has mentioned xnaextras. It's worked fine for me, and I can generate my own fonts and render them perfectly.




Re: XNA Framework Font troubles

tatman blue

XNAExtras solved my problems. It has a tool, albeit commandline, that generates the font image file, xml layout file and has a class for using it.

Thnx so much....to everyone.

Matt