Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
Class that encapsulates text rendering functionality for a typeface.

Namespace: Visual3D.UI
Assembly: Visual3D.UI (in Visual3D.UI.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
public class Font : IGraphicsResource
Public Class Font _
	Implements IGraphicsResource

Members

               
 All Members  Constructors   Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Font(String)
Create a new font from the info in the specified font descriptor (XML) file
CreateGraphicsResources()()()()
DefaultColor
Default color to use for rendering glyphs when no color is specified.
Definition
DisposeGraphicsResources()()()()
DrawText(String, Vector3, ScreenRectangle)
Draw text at the specified location, using the default colors.
DrawText(String, ScreenRectangle, Single)
Draw text into a specified area of the display using the default colors.
DrawText(String, Vector3, ScreenRectangle, ColorRect)
Draw text at the specified location.
DrawText(String, ScreenRectangle, Single, ScreenRectangle)
Draw text into a specified area of the display using the default colors.
DrawText(String, ScreenRectangle, Single, HorizontalTextAlignment)
Draw text into a specified area of the display using the default colors.
DrawText(String, ScreenRectangle, Single, ScreenRectangle, HorizontalTextAlignment)
Draw text into a specified area of the display using the default colors and default text format (Left aligned).
DrawText(String, ScreenRectangle, Single, HorizontalTextAlignment, ColorRect)
Draw text into a specified area of the display using the default colors.
DrawText(String, ScreenRectangle, Single, ScreenRectangle, HorizontalTextAlignment, ColorRect)
Draw text into a specified area of the display.
DrawText(String, ScreenRectangle, Single, ScreenRectangle, HorizontalTextAlignment, ColorRect, Single)
Draw text into a specified area of the display.
DrawTextLine(String, Vector3, ScreenRectangle, ColorRect)
DrawTextLine(String, Vector3, ScreenRectangle, ColorRect, Single)
DrawVerticalTextLine(String, Vector3, ScreenRectangle, ColorRect, Single, HorizontalTextAlignment)
DrawWrappedText(String, ScreenRectangle, Single, ScreenRectangle, HorizontalTextAlignment, ColorRect)
Draws wrapped text, returning the final line count.
DrawWrappedText(String, ScreenRectangle, Single, ScreenRectangle, HorizontalTextAlignment, ColorRect, Single)
Draws wrapped text, returning the final line count.
ExportToXML(ScreenSize)
Family
Font family
FromDrawingFontStyle(FontStyle)
GetCharAtPixel(String, Int32, Single)
GetFormattedLineCount(String, ScreenRectangle, HorizontalTextAlignment)
Return the number of lines the given text would be formatted to.
GetTextExtent(String)
Gets the width in pixels of the specified text.
GetTextWidth(String)
Gets the width in pixels of the specified text.
IsCharacterAvailable(Char)
Return whether this Font can currently draw the specified code-point.
IsDropShadow
LineSpacing
Return the pixel height for this Font.
LoadFromXML(String)
MaxTextExtentDictionarySize
Maximum number of entries for the internal TextExtents dictionary (to cache results) before this dictionary is cleared and started over. (i.e. point at which this cache is dumped).
MeasureString(String, array<Object>[]()[][])
Calculate the width of the given string.
MeasureString(String, Boolean, Single)
Calculate the width of the given string.
Name
Gets the name of this font object.
Parse(String)
Parses the String representation of a Font, and returns the corresponding Font object.
Size
Font size, pts
Style
Font style to use.
ToDrawingFontStyle(FontStyle)
ToString()()()()
Returns a string representation of this Font.
(Overrides Object..::..ToString()()()().)

Remarks

A Font object is created for each unique typeface required. The Font class provides methods for loading typefaces from various sources, and then for outputting text via the [!:Renderer] object.

Inheritance Hierarchy

System..::..Object
  Visual3D.UI..::..Font

See Also