GlyphRunOptions Class
How DrawingCanvas.FillGlyphs and DrawingCanvas.StrokeGlyphs draw a run of glyphs.
public sealed class GlyphRunOptionsConstructors
| Name | Description |
|---|---|
| GlyphRunOptions() |
GlyphRunOptions()
GlyphRunOptions.cspublic GlyphRunOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| BoldWidth | 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. |
| Cache | 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. |
| Contrast | 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. |
| Gamma | 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). |
| ObliqueShear | 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. |
| Palette | Gets the index of the palette of the glyphs a font draws with its own colors. Defaults to 0. |
| Synthesis | Gets what is made from the glyphs when the style wanted has no font: a bold, an oblique, or both (FontSynthesis). |
BoldWidth
GlyphRunOptions.csGets 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
Exceptions
ArgumentException- The value is not a finite number.
ArgumentOutOfRangeException- The value is negative or exceeds 16777216.
Cache
GlyphRunOptions.csGets 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
Contrast
GlyphRunOptions.csGets 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; }Gamma
GlyphRunOptions.csGets 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; }ObliqueShear
GlyphRunOptions.csGets 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
Exceptions
ArgumentException- The value is not a finite number.
ArgumentOutOfRangeException- The magnitude of the value exceeds 16.
Palette
GlyphRunOptions.csGets the index of the palette of the glyphs a font draws with its own colors. Defaults to 0.
public int Palette { get; init; }Synthesis
GlyphRunOptions.csGets 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
Exceptions
ArgumentOutOfRangeException- The value has a flag that
FontSynthesisdoes not define.