Table of Contents

Class FormFonts

Namespace
RDCore.Forms.Avalonia.Controls
Assembly
RDCore.Forms.Avalonia.dll

How a form's fonts are drawn.

public static class FormFonts
Inheritance
FormFonts
Inherited Members

Methods

Apply(Control, FormFont)

Sets a control's font family, size, weight, style, underline and strikethrough to a form font's. The control's text inherits them.

public static void Apply(Control control, FormFont font)

Parameters

control Control

The control.

font FormFont

The font.

Remarks

The underline and the strikethrough are drawn under and through the text of each of the control's text blocks, along the whole text. A text box's text is drawn without them.

ToFontFamily(FormFont)

The family a font is drawn in: the family it names where it is installed, or a sans serif.

public static FontFamily ToFontFamily(FormFont font)

Parameters

font FormFont

The font.

Returns

FontFamily

The font family.

Remarks

An installed family is named alone. Named first in a list of families, a symbol font such as Marlett is passed over for the platform's default face, though it resolves by itself. A font that is not IsNamed is drawn in the sans serif, whatever name it reads.

ToFontSize(FormFont)

The size a font is drawn at, in device-independent pixels.

public static double ToFontSize(FormFont font)

Parameters

font FormFont

The font.

Returns

double

The size: a font's size is in points, and a device-independent pixel is 1/96 of an inch, so 12 points are 16.