PeachDrawing.Text
PeachDrawing.Text
AddOptions Class
What a caller says about a font it adds to a FontSet, in place of what the file says about
itself: the counterpart of the descriptors of a CSS @font-face rule.
public sealed class AddOptions
Inheritance System.Object → AddOptions
Remarks
Every property left null means “use what the font file declares”: a variable font that is given no range covers the range of its own weight, width and slant axes. A stylesheet’s descriptors are the authority on how one resource takes part in matching, whatever the file’s own tables say.
| Properties | |
|---|---|
| FamilyName | The family name to register the font under, when it is not the family name in the file. |
| IsItalic | Whether the font is italic, when that is not what the file declares. |
| ObliqueRange | The range of oblique angles the font covers, in degrees leaning to the right (CSS font-style: oblique 0deg 14deg in an @font-face rule). A font with a range is oblique, and it also matches upright text when the range includes 0. It sets the font’s slant axis, kept inside the range. |
| UnicodeRanges | The code points the font is used for (CSS unicode-range), or null for whatever its cmap covers. |
| Weight | The weight the font is to match, from 1 to 1000, when it is not the weight the file declares. |
| WeightRange | The range of weights the font covers (CSS font-weight: 100 900 in an @font-face rule), from 1 to 1000, when it is not the weight the file declares. It takes the place of Weight. A variable font declared with a range is matched for every weight in it, and the weight asked for sets the font’s weight axis, kept inside the range. |
| Width | The width the font is to match, as an OpenType width class from 1 (ultra-condensed) to 9 (ultra-expanded) with 5 being normal, when it is not the width the file declares. |
| WidthRange | The range of widths the font covers, as percentages of the normal width (CSS font-stretch: 75% 125% in an @font-face rule); 100 is normal. It takes the place of Width. |