DOM.Styles.Font
Represents font (character) formatting for document text runs.
aggregates font family selections (for different script types), typographic features (kerning, scaling, spacing), and text decorations (underline, strike). Most properties are nullable to allow callers to distinguish "not specified" from an explicit value; consumers should apply inheritance or fallback rules when a property is.
24 members
Constructors
Font
3 overloadsFont()Initializes a newinstance with default (unspecified) values.
Font(string fontName, double size, bool bold, bool italic)Initializes a newwith a Latin font family, size, and optional bold/italic.
Parameters
- fontName
- Name of the Latin font (e.g., "Arial", "Times New Roman").
- size
- Font size in points.
- bold
- If, applies bold style.
- italic
- If, applies italic style.
Font(FontPart latin, FontPart eastAsia, FontPart complexScript, FontPart highAnsi)Initializes a newwith explicit Latin and East Asian font parts.
Parameters
- latin
- Latin font part (required).
- eastAsia
- East Asian font part (optional).
- complexScript
- Complex script font part (optional).
- highAnsi
- High ANSI font part (optional).
Properties
Gets or sets a value indicating whether text should be rendered in all capital letters.
Gets or sets the text color.
Gets or sets the font part used for complex script languages (e.g., Arabic, Hebrew).
Gets or sets the East Asian font family (for CJK scripts).
Gets or sets whether emboss effect should be applied to the text.
Gets or sets the emphasis mark (dot, circle, sesame, etc.) to use for the text.
Gets or sets a value indicating whether the font is outlined.
Gets or sets a value indicating whether the font has a shadow effect.
Gets or sets whether the text is hidden (not visible in normal rendering).
Gets or sets the High ANSI font part (legacy code-page behaviour).
Gets or sets a hint describing how the font should be selected or rendered on the target platform.
Gets or sets the font size expressed using.
Use this to control precise point/half-point values and conversions handled by.
Gets or sets the Latin (Western) font family and related settings.
Gets or sets the baseline position adjustment (positive moves text upward).
Gets or sets scaling for the font as a percentage of the normal width.
Useto indicate relative horizontal scaling (100 = normal).
Gets or sets a value indicating whether text should be rendered in small caps.
Gets or sets additional spacing between characters (typically positive to expand).
Gets or sets strike-through style (single, double, none).
Gets or sets whether the text is rendered as subscript.
Gets or sets whether the text is rendered as superscript.
Gets or sets underline style information for the font.