FontTextureProcessor.Process Method
Creates SpriteFontContent from a bitmap.
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Processors
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
Syntax
public virtual SpriteFontContent Process (
Texture2DContent input,
ContentProcessorContext context
)
Parameters
- input
The bitmap data to convert to a font. - context
Context for the specified processor.
Return Value
The font data.
Remarks
Each character should be arranged on the bitmap in a grid ordered from upper left to lower right. Monochrome characters should use white for solid areas and black for transparent areas. To include multicolored characters, add an alpha channel to the bitmap and use that to control which parts of the character are solid. Fill the spaces between each character and around the edges of the grid with a specific magenta color having the value Red:255 Green:0 Blue:255 Alpha:255. The processor packs the characters together as tightly as possible, eliminating any wasted space in the original grid.
See Also
Reference
FontTextureProcessor Class
FontTextureProcessor Members
Microsoft.Xna.Framework.Content.Pipeline.Processors Namespace
Platforms
Windows XP SP2, Windows Vista