Share via


Font Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Defines a particular format for text, including font choice, font size, and style attributes.

Inheritance Hierarchy

System. . :: . .Object
  System. . :: . .MarshalByRefObject
    Microsoft.SPOT..::..Font

Namespace:  Microsoft.SPOT
Assembly:  Microsoft.SPOT.Graphics (in Microsoft.SPOT.Graphics.dll)

Syntax

'Declaration
Public NotInheritable Class Font _
    Inherits MarshalByRefObject
public sealed class Font : MarshalByRefObject
public ref class Font sealed : public MarshalByRefObject
[<Sealed>]
type Font =  
    class
        inherit MarshalByRefObject
    end
public final class Font extends MarshalByRefObject

The Font type exposes the following members.

Properties

  Name Description
Public property Ascent Gets the ascent measurement for the current font, in pixels.
Public property AverageWidth Gets the average width of the characters in the current font, in pixels.
Public property Descent Gets the descent measurement for the current font, in pixels.
Public property ExternalLeading Gets the external leading measurement for the current font, in pixels.
Public property Height Gets the height of the current font, in pixels.
Public property InternalLeading Gets the internal leading measurement for the current font, in pixels.
Public property MaxWidth Gets the width of the widest character in the current font, in pixels.

Top

Methods

  Name Description
Public method CharWidth Retrieves the width of the specified character, in pixels.
Public method ComputeExtent(String, Int32%, Int32%) Computes the width and height of a specified line of text.
Public method ComputeExtent(String, Int32%, Int32%, Int32) Computes the width, height, and kerning of a specified line of text.
Public method ComputeTextInRect(String, Int32%, Int32%) Computes the size of the rectangular area on the display device needed to render the specified text string.
Public method ComputeTextInRect(String, Int32%, Int32%, Int32) Computes the size of the rectangular area on the display device needed to render the specified text string.
Public method ComputeTextInRect(String, Int32%, Int32%, Int32, Int32, Int32, Int32, UInt32) Computes the size of the rectangular area on the display device needed to render the specified text string.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member DefaultKerning Contains the default kerning for a particular font.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SPOT Namespace