Table of Contents

Class RenderFont

Namespace
OFT.Rendering.Tools
Assembly
OFT.Rendering.dll

Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.

public sealed class RenderFont
Inheritance
object
RenderFont
Extension Methods

Constructors

RenderFont(string, float)

Initializes a new OFT.Rendering.Font using a specified size.

public RenderFont(string familyName, float emSize)

Parameters

familyName string

A string representation of the OFT.Rendering.FontFamily for the new OFT.Rendering.Font.

emSize float

The em-size, in points, of the new font.

RenderFont(string, float, FontStyle)

Initializes a new OFT.Rendering.Font using a specified size and style.

public RenderFont(string familyName, float emSize, FontStyle style)

Parameters

familyName string

A string representation of the OFT.Rendering.FontFamily for the new OFT.Rendering.Font.

emSize float

The em-size, in points, of the new font.

style FontStyle

The OFT.Rendering.FontStyle of the new font.

RenderFont(string, float, FontStyle, GraphicsUnit)

Initializes a new OFT.Rendering.Font using a specified size, style, and unit.

public RenderFont(string familyName, float emSize, FontStyle style, GraphicsUnit unit)

Parameters

familyName string

A string representation of the OFT.Rendering.FontFamily for the new OFT.Rendering.Font.

emSize float

The em-size of the new font in the units specified by the unit parameter.

style FontStyle

The OFT.Rendering.FontStyle of the new font.

unit GraphicsUnit

The OFT.Rendering.GraphicsUnit of the new font.

RenderFont(string, float, FontStyle, GraphicsUnit, byte)

Initializes a new OFT.Rendering.Font using a specified size, style, unit, and character set.

public RenderFont(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte gdiCharSet)

Parameters

familyName string

A string representation of the OFT.Rendering.FontFamily for the new OFT.Rendering.Font.

emSize float

The em-size of the new font in the units specified by the unit parameter.

style FontStyle

The OFT.Rendering.FontStyle of the new font.

unit GraphicsUnit

The OFT.Rendering.GraphicsUnit of the new font.

gdiCharSet byte

A byte that specifies a GDI character set to use for this font.

RenderFont(string, float, GraphicsUnit)

Initializes a new OFT.Rendering.Font using a specified size and unit. The style is set to OFT.Rendering.FontStyle.Regular.

public RenderFont(string familyName, float emSize, GraphicsUnit unit)

Parameters

familyName string

A string representation of the OFT.Rendering.FontFamily for the new OFT.Rendering.Font.

emSize float

The em-size of the new font in the units specified by the unit parameter.

unit GraphicsUnit

The OFT.Rendering.GraphicsUnit of the new font.

Properties

Bold

Gets a value that indicates whether this OFT.Rendering.Font is bold.

public bool Bold { get; }

Property Value

bool

true if this OFT.Rendering.Font is bold; otherwise, false.

FontFamily

Gets the OFT.Rendering.FontFamily associated with this OFT.Rendering.Font.

public string FontFamily { get; }

Property Value

string

The OFT.Rendering.FontFamily associated with this OFT.Rendering.Font.

Italic

Gets a value that indicates whether this OFT.Rendering.Font is italic.

public bool Italic { get; }

Property Value

bool

true if this OFT.Rendering.Font is italic; otherwise, false.

Size

Gets the size of this OFT.Rendering.Font measured in the points (1/72 inch).

public float Size { get; }

Property Value

float

The em-size of this OFT.Rendering.Font.

Style

Gets style information for this OFT.Rendering.Font.

public FontStyle Style { get; }

Property Value

FontStyle

A OFT.Rendering.FontStyle enumeration that contains style information for this OFT.Rendering.Font.

Unit

Gets the unit of measure for this OFT.Rendering.Font.

public GraphicsUnit Unit { get; }

Property Value

GraphicsUnit

A OFT.Rendering.GraphicsUnit that represents the unit of measure for this OFT.Rendering.Font.

Methods

Equals(RenderFont?)

Indicates whether the specified object is a OFT.Rendering.Font and has the same OFT.Rendering.Font.FontFamily, OFT.Rendering.Font.GdiVerticalFont, OFT.Rendering.Font.GdiCharSet, OFT.Rendering.Font.Style, OFT.Rendering.Font.Size, and OFT.Rendering.Font.Unit property values as this OFT.Rendering.Font.

Added in ATAS 8.0.15.

public bool Equals(RenderFont? other)

Parameters

other RenderFont

The object to test.

Returns

bool

true if the other parameter is a OFT.Rendering.Font and has the same OFT.Rendering.Font.FontFamily, OFT.Rendering.Font.GdiVerticalFont, OFT.Rendering.Font.GdiCharSet, OFT.Rendering.Font.Style, OFT.Rendering.Font.Size, and OFT.Rendering.Font.Unit property values as this OFT.Rendering.Font; otherwise, false.

Equals(object?)

Determines whether obj is a RenderFont equal to this font; see Equals(RenderFont?).

Added in ATAS 8.0.15.

public override bool Equals(object? obj)

Parameters

obj object

Object to compare with.

Returns

bool

true when the fonts are equal.

GetHashCode()

Returns a hash code computed from the font family, style and size.

public override int GetHashCode()

Returns

int

The hash code.

ToString()

Returns a diagnostic string with the font family, style and size, for example RenderFont Arial Regular 9.

public override string ToString()

Returns

string

The string representation.