Project

ChartForgeX

Render deterministic charts, dashboards, topology, hierarchy, and report visuals directly from .NET.

Stars 47
Forks 2
NuGet downloads 75,067
Release ChartForgeX-v2.0.0
Language: HTML Updated: 2026-10-12

API Reference

Class

TextStyle

Namespace ChartForgeX.Typography
Assembly ChartForgeX
Modifiers sealed

Defines fully resolved text styling shared by charts, topology, visual blocks, canvases, and image composition.

Inheritance

  • Object
  • TextStyle

Usage

Explore 16 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.

Accepted by parameters 9

Constructors

public TextStyle() #

Methods

public TextStyle Clone() #
Returns: TextStyle

Creates a copy that can be modified independently.

public static TextStyle Create(Double fontSize, ChartColor color) #
Returns: TextStyle

Creates a text style using the supplied size and color.

Parameters

fontSize System.Double requiredposition: 0
color ChartForgeX.Primitives.ChartColor requiredposition: 1

Properties

public FontSpec Font { get; set; } #

Gets or sets the font selection.

public Double FontSize { get; set; } #

Gets or sets the font size in logical pixels.

public ChartColor Color { get; set; } #

Gets or sets the text color.

public TextAlignment Alignment { get; set; } #

Gets or sets horizontal alignment inside the layout region.

public Double LineHeight { get; set; } #

Gets or sets line height as a multiplier of the measured font height.

public Boolean Underline { get; set; } #

Gets or sets a compatibility value that maps to a single solid underline.

public TextDecorationStyle UnderlineStyle { get; set; } #

Gets or sets the underline pattern.

public Boolean Strikethrough { get; set; } #

Gets or sets a compatibility value that maps to a single solid strikethrough.

public TextDecorationStyle StrikethroughStyle { get; set; } #

Gets or sets the strikethrough pattern.

public TextBaseline Baseline { get; set; } #

Gets or sets vertical baseline placement.

public TextCaseTransform TextCase { get; set; } #

Gets or sets the display-time text-case transform.

public TextHinting Hinting { get; set; } #

Gets or sets how raster output fits this text to the pixel grid. TextHinting.Auto (the default) snaps the baseline, x-height, and cap height of text at 12 output pixels and below to whole pixels without changing its width; TextHinting.None draws the outlines exactly. TextHinting.Full also fits and darkens narrow straight stems, retaining the same layout. SVG and HTML output leave hinting to the browser.

public String? OpenTypeLanguageTag { get; set; } #

Gets or sets the OpenType language-system tag (for example, SRB or TRK). Null selects the font's default language system. Tags are case-sensitive and padded to four characters; an absent language in a font falls back to its default. This is not a culture name.

public Double EffectiveFontSize { get; } #

Gets the font size used to measure and render this style.