FontDescriptionImporter.Import Method

Called by the XNA Framework when importing a .spritefont file to be used as a game asset. This is the method called by the XNA Framework when an asset is to be imported into an object that can be recognized by the Content Pipeline.

Namespace: Microsoft.Xna.Framework.Content.Pipeline
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

Syntax

public override FontDescription Import (
         string filename,
         ContentImporterContext context
)

Parameters

  • filename
    Name of a game asset file.
  • context
    Contains information for importing a game asset, such as a logger interface.

Return Value

Resulting game asset.

Exceptions

Exception type Condition
ArgumentNullException filename is null.
SecurityException Sufficient permissions are not available to access filename.
FileNotFoundException The file identified by the filename does not exist.
UriFormatException The format of filename is not correct.
InvalidContentException The XML in filename is either badly formed or does not represent a FontDescription object.

See Also

Reference

FontDescriptionImporter Class
FontDescriptionImporter Members
Microsoft.Xna.Framework.Content.Pipeline Namespace

Platforms

Windows XP SP2, Windows Vista