Sprite Font XML Schema Reference

This section contains a list of the valid tags and values for the Sprite Font (.spritefont) XML files used by the Content Pipeline to create SpriteFont textures.

Tag Name Content Type Content Description
<FontName> string The name of the font to be imported. This is not the name of a font file, but rather the friendly name that identifies the font once it is installed on your computer. You can use the Fonts folder in Control Panel to see the names of fonts installed on your system, and to install new ones as well. The Content Pipeline supports the same fonts as the System.Drawing.Font class, including TrueType fonts but not bitmap (.fon) fonts.
<Size> float The point size of the font to be imported.
<Spacing> float The number of pixels to add between each character when the string is rendered.
<Style> "Regular", "Bold", "Italic", or "Bold, Italic" The style of the font to be imported.
<CharacterRegions> Zero or more <CharacterRegion> tags Zero or more numerical ranges indicating which subset of Unicode characters to import. If no <CharacterRegion> is specified, the whole font is imported.
<CharacterRegion> One <Start> and one <End> tag The beginning and end of a region of Unicode characters.
<Start> char The first Unicode character to include in a <CharacterRegion>.
<End> char The last Unicode character to include in a <CharacterRegion>.

See Also

Concepts

2D Graphics Overview

Tasks

How to: Draw Text

Reference

SpriteFont