Jackie Williams Jr
Jackie Williams Jr

Reputation: 11

XNA Nuclex Spritefont Framework and Spritefont Textures

The way XNA 4.0 render fonts on the screen is a step back from XNA 3.1, to say the least. Thankfully, using the Nuclex Framework has solved this problem. However, this is for spritefont files.

Is there a way Nuclex can support spritefont textures(Nubik's, etc...) as well? If not, how do you take "not-so-common" font, convert it to a spritefont, and make sure it's displayed on another computer(which probably won't have that font installed)?

Upvotes: 0

Views: 695

Answers (1)

neeKo
neeKo

Reputation: 4280

Spritefonts are compiled. You get a spritefont.xnb file when you build your content, and this file contains all of your characters (the ones you defined in the .spritefont file). Since the game uses the characters that are in these files - which get deployed with your game - there is no need for the target computer to have any fonts.

Also, there is no need for Nuclex to support spritefont textures - you can use these textures in your content as they are because they will remain unchanged. Nuclex fonts only use a different way of drawing characters than the default XNA Spritefont processor does. The spritefont texture characters are already drawn.

Upvotes: 1

Related Questions