FontLoadOptions Class
Options for loading a font. Instances are immutable and can be shared.
public sealed class FontLoadOptionsConstructors
| Name | Description |
|---|---|
| FontLoadOptions() |
FontLoadOptions()
FontLoadOptions.cspublic FontLoadOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Configuration | Gets the configuration: the limits that bound the bytes read (ImageResourceLimits.MaxEncodedBytes), the bytes the font keeps (ImageResourceLimits.MaxFontBytes) and the work of decoding one of its glyphs (ImageResourceLimits.MaxGlyphComplexity). Defaults to ImageConfiguration.Default. |
| Default | Gets the default options. |
| UseEmbeddedBitmaps | Gets a value indicating whether the bitmaps without colors a font has for some sizes replace the outlines of its glyphs at these sizes. false by default: a glyph is drawn from its outline at every size. |
Configuration
FontLoadOptions.csGets the configuration: the limits that bound the bytes read (ImageResourceLimits.MaxEncodedBytes), the bytes the font keeps (ImageResourceLimits.MaxFontBytes) and the work of decoding one of its glyphs (ImageResourceLimits.MaxGlyphComplexity). Defaults to ImageConfiguration.Default.
public ImageConfiguration Configuration { get; init; }Default
FontLoadOptions.csUseEmbeddedBitmaps
FontLoadOptions.csGets a value indicating whether the bitmaps without colors a font has for some sizes replace the outlines of its glyphs at these sizes. false by default: a glyph is drawn from its outline at every size.
public bool UseEmbeddedBitmaps { get; init; }Property value
Remarks
Some fonts, mostly fonts of Chinese, Japanese and Korean made for screens of low resolution, have for a few sizes a drawing of each glyph made pixel by pixel (the EBLC and EBDT tables). With this option, a text whose size, in pixels per em, is exactly the size of such a strike is drawn with these pixels: each one is a square of the outline of the glyph, so the text is filled, stroked, measured and placed on a path like any other, and a glyph drawn at a whole position has the pixels of its bitmap. At any other size, and for a glyph the strike does not have, the outline is drawn.
Only bitmaps of one bit per pixel are used. The advances stay those of the outlines. The images with colors of a font (sbix, CBDT) do not depend on this option: they are always drawn.