Table of Contents

Class FontData

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The FontData interface of the {{domxref("Local Font Access API", "Local Font Access API", "", "nocode")}} represents a single local font face.
[Value("FontData")]
public class FontData
Inheritance
FontData
Inherited Members

Remarks

Constructors

FontData()

public FontData()

Properties

Family

NOTE
Experimental
The family read-only property of the FontData interface returns the family of the font face.
[Value("family")]
public string Family { get; }

Property Value

string

A string.

Remarks

This is the name used when referring to the font family from code, for example, in the font-family property or in places within the @font-face at-rule such as the local() function.

Examples include:

-Use advanced typography with local fonts
-@font-face

See also on MDN

FullName

NOTE
Experimental
The fullName read-only property of the FontData interface returns the full name of the font face. This is usually a human-readable name used to identify the font, e.g., "Optima Bold".
[Value("fullName")]
public string FullName { get; }

Property Value

string

A string.

Remarks

PostscriptName

NOTE
Experimental
The postscriptName read-only property of the FontData interface returns the PostScript name of the font face.
[Value("postscriptName")]
public string PostscriptName { get; }

Property Value

string

A string.

Remarks

This is the name used to uniquely identify the PostScript font, and is generally an unbroken sequence of characters that includes the font's name and style.

Examples include:

-Use advanced typography with local fonts
-@font-face

See also on MDN

Style

NOTE
Experimental
The style read-only property of the FontData interface returns the style of the font face.
[Value("style")]
public string Style { get; }

Property Value

string

A string.

Remarks

This is the value used to select the style of the font you want to use, for example inside the font-style property.

Examples include:

-Use advanced typography with local fonts
-@font-face

See also on MDN

Methods

Blob()

NOTE
Experimental
The blob() method of the FontData interface returns a {{jsxref("Promise")}} that fulfills with a Blob() containing the raw bytes of the underlying font file.
[Value("blob")]
public Task<Blob> Blob()

Returns

Task<Blob>

A {{jsxref("Promise")}} that fulfills with a Blob() containing the raw bytes of the underlying font file.

Remarks