GlyphRunOptions Class

public sealed class GlyphRunOptions

Constructors

NameDescription
GlyphRunOptions()

GlyphRunOptions()

GlyphRunOptions.cs
public GlyphRunOptions()

No documentation is available.

Properties

NameDescription
BoldWidthGets the width of the stroke a synthetic bold fills the glyphs with, in units of the drawing, or null (the default) for 1/24 of the size of the text. Browsers use 1/24 up to 9 pixels and 1/32 from 36 pixels.
CacheGets the cache that keeps the coverage of the glyphs and the display lists of the glyphs a font draws with its own colors from one draw call to the next, or null (the default) for none: the pixels are the same either way.
ContrastGets how much the coverage of the antialiased glyphs is raised before it is blended, from 0 (the default: the coverage of the outline) to 1, as the contrast of the glyph masks of Skia (SK_GAMMA_CONTRAST) for a dark text: a partially covered pixel gets c + contrast × c × (1 - c), which makes the text heavier, whatever its color.
GammaGets the gamma of the correction of the coverage of the antialiased glyphs, after the GlyphRunOptions.Contrast, as the glyph masks of Skia (SK_GAMMA_EXPONENT) for a dark text: a coverage c becomes 1 - (1 - c)^(1 / gamma), lighter above 1 and heavier below 1. Defaults to 1 (no correction).
ObliqueShearGets what a synthetic oblique adds to the horizontal position of a point for each unit of its height above the baseline, or null (the default) for 1/4: the tangent of the angle of the slant.
PaletteGets the index of the palette of the glyphs a font draws with its own colors. Defaults to 0.
SynthesisGets what is made from the glyphs when the style wanted has no font: a bold, an oblique, or both (FontSynthesis).

Gets the width of the stroke a synthetic bold fills the glyphs with, in units of the drawing, or null (the default) for 1/24 of the size of the text. Browsers use 1/24 up to 9 pixels and 1/32 from 36 pixels.

public double? BoldWidth { get; init; }

Property value

double?

Exceptions

ArgumentException
The value is not a finite number.
ArgumentOutOfRangeException
The value is negative or exceeds 16777216.

Gets the cache that keeps the coverage of the glyphs and the display lists of the glyphs a font draws with its own colors from one draw call to the next, or null (the default) for none: the pixels are the same either way.

public GlyphCache? Cache { get; init; }

Property value

GlyphCache?

Gets how much the coverage of the antialiased glyphs is raised before it is blended, from 0 (the default: the coverage of the outline) to 1, as the contrast of the glyph masks of Skia (SK_GAMMA_CONTRAST) for a dark text: a partially covered pixel gets c + contrast × c × (1 - c), which makes the text heavier, whatever its color.

public double Contrast { get; init; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1.

Gets the gamma of the correction of the coverage of the antialiased glyphs, after the GlyphRunOptions.Contrast, as the glyph masks of Skia (SK_GAMMA_EXPONENT) for a dark text: a coverage c becomes 1 - (1 - c)^(1 / gamma), lighter above 1 and heavier below 1. Defaults to 1 (no correction).

public double Gamma { get; init; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0.25 and 4.

ObliqueShear

GlyphRunOptions.cs

Gets what a synthetic oblique adds to the horizontal position of a point for each unit of its height above the baseline, or null (the default) for 1/4: the tangent of the angle of the slant.

public double? ObliqueShear { get; init; }

Property value

double?

Exceptions

ArgumentException
The value is not a finite number.
ArgumentOutOfRangeException
The magnitude of the value exceeds 16.

Gets the index of the palette of the glyphs a font draws with its own colors. Defaults to 0.

public int Palette { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is negative.

Gets what is made from the glyphs when the style wanted has no font: a bold, an oblique, or both (FontSynthesis).

public FontSynthesis Synthesis { get; init; }

Property value

FontSynthesis

Exceptions

ArgumentOutOfRangeException
The value has a flag that FontSynthesis does not define.