Skip to content
ChartForgeX
Class

TextStyleOverride

ChartForgeX.Typography

Namespace
ChartForgeX.Typography
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent(Copy = "Clone")

Defines optional overrides that can be resolved over a complete TextStyle.

Inheritance

  • object
  • TextStyleOverride

Usage

Explore 202 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 69

Accepted by parameters 133

Constructors

public TextStyleOverride() #

Methods

public TextStyleOverride Clone() #

Creates an independent copy of the optional typography values.

public TextStyle Resolve(TextStyle fallback) #

Resolves these overrides over a complete text style without mutating the fallback.

Parameters

fallback ChartForgeX.Typography.TextStyle required

Returns

TextStyle
public string TransformText(string text, CultureInfo? culture = null) #

Transforms text according to this override.

Parameters

text string required
culture System.Globalization.CultureInfo? = null optional

Returns

string
public TextStyleOverride Variation(string tag, double value) #

Sets one OpenType variation axis in design units.

Parameters

tag string required
value double required

Properties

public int? ColorPaletteIndex { get; set; } #

Gets or sets an optional zero-based CPAL palette. Null inherits; zero resets to the default.

public FontVariationSettings? Variations { get; set; } #

Gets or sets explicit OpenType axes. Null inherits; Default restores the font's default instance.

public ChartColor? Color { get; set; } #

Gets or sets the optional text color override.

public string? FontFamily { get; set; } #

Gets or sets the optional CSS font-family override.

public int? FontWeight { get; set; } #

Gets or sets the optional font weight, from 1 to 1000; 400 is regular and 700 bold.

public string? OpenTypeLanguageTag { get; set; } #

Gets or sets the optional OpenType language-system tag, such as SRB or TRK. A null override retains the fallback style's language; normal selects the font's default.

public double? FontSize { get; set; } #

Gets or sets the optional font size override.

public double? LetterSpacing { get; set; } #

Gets or sets additional logical pixels between eligible shaped groups. Null inherits; zero resets spacing.

public bool Italic { get; set; } #

Gets or sets a value indicating whether text is italic.

public bool Underline { get; set; } #

Gets or sets a value indicating whether text is underlined. Turning it on selects a single underline unless a style is already set; turning it off selects none.

public TextDecorationStyle? UnderlineStyle { get; set; } #

Gets or sets an optional underline pattern. None explicitly disables a fallback underline; null clears the underline override so the fallback applies.

public bool Strikethrough { get; set; } #

Gets or sets whether text is struck through. Turning it on selects a single strikethrough unless a style is already set; turning it off selects none.

public TextDecorationStyle? StrikethroughStyle { get; set; } #

Gets or sets an optional strikethrough pattern. None explicitly disables a fallback strike; null clears the strikethrough override so the fallback applies.

public TextBaseline? Baseline { get; set; } #

Gets or sets optional subscript or superscript placement.

public TextCaseTransform? TextCase { get; set; } #

Gets or sets an optional display-time casing transform.

public bool HasOverrides { get; } #

Gets a value indicating whether this instance contains explicit overrides.

Extension Methods

public static TextStyleOverride Baseline(TextStyleOverride textStyleOverride, TextBaseline? value) #

Sets TextStyleOverride.Baseline: Gets or sets optional subscript or superscript placement.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Typography.TextBaseline? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Baseline = value };    textStyleOverride.Baseline(value);
public static TextStyleOverride Color(TextStyleOverride textStyleOverride, ChartColor? value) #

Sets TextStyleOverride.Color: Gets or sets the optional text color override.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Primitives.ChartColor? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                              // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Color = value };    textStyleOverride.Color(value);
public static TextStyleOverride ColorPaletteIndex(TextStyleOverride textStyleOverride, int? value) #

Sets TextStyleOverride.ColorPaletteIndex: Gets or sets an optional zero-based CPAL palette. Null inherits; zero resets to the default.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value int? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { ColorPaletteIndex = value };    textStyleOverride.ColorPaletteIndex(value);
public static TextStyleOverride FontFamily(TextStyleOverride textStyleOverride, string? value) #

Sets TextStyleOverride.FontFamily: Gets or sets the optional CSS font-family override.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value string? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { FontFamily = value };    textStyleOverride.FontFamily(value);
public static TextStyleOverride FontSize(TextStyleOverride textStyleOverride, double? value) #

Sets TextStyleOverride.FontSize: Gets or sets the optional font size override.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value double? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { FontSize = value };    textStyleOverride.FontSize(value);
public static TextStyleOverride FontWeight(TextStyleOverride textStyleOverride, int? value) #

Sets TextStyleOverride.FontWeight: Gets or sets the optional font weight, from 1 to 1000; 400 is regular and 700 bold.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value int? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { FontWeight = value };    textStyleOverride.FontWeight(value);
public static TextStyleOverride Italic(TextStyleOverride textStyleOverride, bool value = true) #

Sets TextStyleOverride.Italic: Gets or sets a value indicating whether text is italic.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                               // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Italic = value };    textStyleOverride.Italic(value);
public static TextStyleOverride LetterSpacing(TextStyleOverride textStyleOverride, double? value) #

Sets TextStyleOverride.LetterSpacing: Gets or sets additional logical pixels between eligible shaped groups. Null inherits; zero resets spacing.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value double? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { LetterSpacing = value };    textStyleOverride.LetterSpacing(value);
public static TextStyleOverride OpenTypeLanguageTag(TextStyleOverride textStyleOverride, string? value) #

Sets TextStyleOverride.OpenTypeLanguageTag: Gets or sets the optional OpenType language-system tag, such as SRB or TRK. A null override retains the fallback style's language; normal selects the font's default.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value string? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                            // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { OpenTypeLanguageTag = value };    textStyleOverride.OpenTypeLanguageTag(value);
public static TextStyleOverride Strikethrough(TextStyleOverride textStyleOverride, bool value = true) #

Sets TextStyleOverride.Strikethrough: Gets or sets whether text is struck through. Turning it on selects a single strikethrough unless a style is already set; turning it off selects none.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Strikethrough = value };    textStyleOverride.Strikethrough(value);
public static TextStyleOverride StrikethroughStyle(TextStyleOverride textStyleOverride, TextDecorationStyle? value) #

Sets TextStyleOverride.StrikethroughStyle: Gets or sets an optional strikethrough pattern. None explicitly disables a fallback strike; null clears the strikethrough override so the fallback applies.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Typography.TextDecorationStyle? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                           // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { StrikethroughStyle = value };    textStyleOverride.StrikethroughStyle(value);
public static TextStyleOverride TextCase(TextStyleOverride textStyleOverride, TextCaseTransform? value) #

Sets TextStyleOverride.TextCase: Gets or sets an optional display-time casing transform.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Typography.TextCaseTransform? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { TextCase = value };    textStyleOverride.TextCase(value);
public static TextStyleOverride Underline(TextStyleOverride textStyleOverride, bool value = true) #

Sets TextStyleOverride.Underline: Gets or sets a value indicating whether text is underlined. Turning it on selects a single underline unless a style is already set; turning it off selects none.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Underline = value };    textStyleOverride.Underline(value);
public static TextStyleOverride UnderlineStyle(TextStyleOverride textStyleOverride, TextDecorationStyle? value) #

Sets TextStyleOverride.UnderlineStyle: Gets or sets an optional underline pattern. None explicitly disables a fallback underline; null clears the underline override so the fallback applies.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Typography.TextDecorationStyle? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { UnderlineStyle = value };    textStyleOverride.UnderlineStyle(value);
public static TextStyleOverride Variations(TextStyleOverride textStyleOverride, FontVariationSettings? value) #

Sets TextStyleOverride.Variations: Gets or sets explicit OpenType axes. Null inherits; Default restores the font's default instance.

Parameters

textStyleOverride ChartForgeX.Typography.TextStyleOverride required
The instance.
value ChartForgeX.Typography.FontVariationSettings? required
The value.

Returns

TextStyleOverride The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Typography.TextStyleOverride { Variations = value };    textStyleOverride.Variations(value);