Home | Gaming | Programming | Play Online | Contact | Keyword Query
Games++ Games & Game Programming

GAMES++
Games++ Home
Games++ Gaming
Games++ Programming
Beta Testing Games
Free Online Games
Hints & Cheats

BROWSER UTILITIES
E-mail This Page
Add to Favorites

SITE SEARCH

Web Games++

AFFILIATES
Cheat Codes
Trickster Wiki
Game Ratings
Gameboy Cheats
PlayStation Cheats
BlackBerry Games
Photoshop Tutorials
Illustrator Tutorials
ImageReady Tutorials

ADVERTISEMENT

ADVERTISEMENT

Creating Your Own Fonts From TTF Files

Xbox Programming & Development

OK, first you gotta run it through C:\Program Files\Microsoft Xbox SDK\Tools\Win32\Graphics\FontMaker, (choose size) where you will end up with 2 files...

  1. tga-file, which contains a raw graphics of the fonts
  2. abc-file, contains coordinates to each letter in the tga-file.

now, put these two files in your projects folder\Media\Fonts\ dir, and create a font.rdf file in your project.

( I made a dodger-font in this example )

// setting up the font files.

out_header Font.h
out_packedresource Media\Font.xpr
out_error Font.err

Texture Font
{
	Source Media\Fonts\Dodger_18.tga
	Format D3DFMT_A4R4G4B4
	Levels 1
}

UserData FontData
{
	DataFile Media\Fonts\Dodger_18.abc
}

Now, it should look something like this in your project list :

Right click on font.rdf and make it like this :

Now you can use the "xfont" -system from microsoft.

#include "XBFont.h"

CXBFont cFont;

void main(void)
{
	cFont.Create(Info.g_pd3dDevice,"Font.xpr");
}

Copyright © 1998-2007, Games++ All rights reserved. | Privacy Policy