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

FontSpec

Namespace ChartForgeX.Typography
Assembly ChartForgeX
Modifiers sealed

Identifies a font without depending on a platform drawing framework.

Inheritance

  • Object
  • FontSpec

Usage

Explore 9 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 1

Constructors

public FontSpec() #

Methods

public FontSpec Clone() #
Returns: FontSpec

Creates a copy that can be modified independently.

public static FontSpec FromFamily(String family) #
Returns: FontSpec

Creates a font specification for a family or fallback stack.

Parameters

family System.String requiredposition: 0
public static FontSpec FromFile(String path, Int32? collectionIndex = null, String? faceName = null) #
Returns: FontSpec

Creates a font specification backed by a TrueType font file.

Parameters

path System.String requiredposition: 0
collectionIndex System.Int32? = null optionalposition: 1
faceName System.String? = null optionalposition: 2
public static FontSpec SystemSans() #
Returns: FontSpec

Creates a system sans-serif font specification.

public FontSpec WithColorPalette(Int32 index) #
Returns: FontSpec

Selects a colour-font palette without changing glyph advances.

Parameters

index System.Int32 requiredposition: 0
public FontSpec WithVariation(String tag, Double value) #
Returns: FontSpec

Selects an explicit variation axis in design units.

Parameters

tag System.String requiredposition: 0
value System.Double requiredposition: 1

Properties

public Int32 ColorPaletteIndex { get; set; } #

Gets or sets the zero-based CPAL palette index. Zero is the default. Missing or unusable palettes fall back to the font's default palette; bitmap glyphs are unaffected.

public FontVariationSettings Variations { get; set; } #

Gets or sets immutable OpenType axis coordinates. The default uses the face's default instance; Weight and Italic retain their existing face-selection policy.

public String Family { get; set; } #

Gets or sets the CSS-compatible family or fallback stack.

public String? FilePath { get; set; } #

Gets or sets an optional TrueType or TrueType collection path used by raster output.

public Int32? CollectionIndex { get; set; } #

Gets or sets an optional TrueType collection face index.

public String? FaceName { get; set; } #

Gets or sets an optional face name used when selecting a collection member.

public Int32 Weight { get; set; } #

Gets or sets the CSS numeric font weight from 1 through 1000, independently of available font faces.

public Boolean Italic { get; set; } #

Gets or sets a value indicating whether an italic face is preferred.