Export (0) Print
Expand All

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 NameContent TypeContent Description
<FontName>stringThe 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> floatThe point size of the font to be imported.
<Spacing> floatThe 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> tagsZero 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> tagThe beginning and end of a region of Unicode characters.
<Start> charThe first Unicode character to include in a <CharacterRegion>.
<End> charThe last Unicode character to include in a <CharacterRegion>.
Show:
© 2014 Microsoft