Docs · API reference · Verso.Abstractions

FontDescriptor Class#

Describes the font settings used to render text within a notebook cell.

public sealed record FontDescriptor : System.IEquatable<Verso.Abstractions.FontDescriptor>

Inheritance System.Object → FontDescriptor

Implements System.IEquatable<FontDescriptor>

Constructors#

FontDescriptor(string, double, int, double) Constructor#

Describes the font settings used to render text within a notebook cell.

public FontDescriptor(string Family, double SizePx, int Weight=400, double LineHeight=1.4);

Parameters#

Family System.String

The CSS font-family name (e.g. "Cascadia Code", "Consolas").

SizePx System.Double

The font size in pixels.

Weight System.Int32

The font weight (100-900). Defaults to 400 (normal).

LineHeight System.Double

The line-height multiplier relative to the font size. Defaults to 1.4.

Properties#

Family Property#

The CSS font-family name (e.g. "Cascadia Code", "Consolas").

public string Family { get; init; }

Property Value#

System.String

LineHeight Property#

The line-height multiplier relative to the font size. Defaults to 1.4.

public double LineHeight { get; init; }

Property Value#

System.Double

SizePx Property#

The font size in pixels.

public double SizePx { get; init; }

Property Value#

System.Double

Weight Property#

The font weight (100-900). Defaults to 400 (normal).

public int Weight { get; init; }

Property Value#

System.Int32