Show / Hide Table of Contents

Class FontFamily

Represents a family of related fonts.

Inheritance
System.Object
FontFamily
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: System.Windows.Media
Assembly: OpenSilver.dll
Syntax
public class FontFamily

Constructors

| Improve this Doc View Source

FontFamily(String)

Initializes a new instance of the FontFamily class from the specified font family string.

Declaration
public FontFamily(string familyName)
Parameters
Type Name Description
System.String familyName

The family name or names that comprise the new FontFamily.

Properties

| Improve this Doc View Source

Source

Gets the font family name that is used to construct the FontFamily object.

Declaration
public string Source { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

Equals(Object)

Gets a value that indicates whether the current font family object and the specified font family object are the same.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
System.Object o

The object to compare.

Returns
Type Description
System.Boolean

true if o is equal to the current FontFamily object; otherwise, false. If o is not a FontFamily object, false is returned.

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Serves as a hash function for FontFamily.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

An integer hash value.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

LoadFontAsync(String)

Declaration
public static Task<bool> LoadFontAsync(string fontSource)
Parameters
Type Name Description
System.String fontSource
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>
| Improve this Doc View Source

LoadFontAsync(FontFamily)

Declaration
public static Task<bool> LoadFontAsync(FontFamily font)
Parameters
Type Name Description
FontFamily font
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>
| Improve this Doc View Source

ToString()

Returns a string representation of this FontFamily.

Declaration
public override string ToString()
Returns
Type Description
System.String

The input font family string.

Overrides
System.Object.ToString()
  • Improve this Doc
  • View Source