Table of Contents

Class PipelineMetrics

Namespace
KernSmith
Assembly
KernSmith.dll

Timing breakdown for each stage of the font generation pipeline. Enable with CollectMetrics or BmFontBuilder.WithCollectMetrics(), then read BmFontResult.Metrics.

Stages are recorded in pipeline order:

  1. FontParsing — Reading and parsing the TTF/OTF/WOFF font file (tables, metrics, kerning).
  2. CharsetResolution — Resolving requested characters against the font's available codepoints.
  3. Rasterization — Rendering each glyph to a bitmap via FreeType (or custom rasterizer).
  4. EffectsCompositing — Applying layered effects: outline, gradient, and shadow.
  5. PostProcessing — Running user-supplied IGlyphPostProcessor instances.
  6. SuperSampleDownscale — Downscaling glyphs rendered at Nx resolution back to target size.
  7. CellEqualization — Padding glyph cells to equal height when EqualizeCellHeights is enabled.
  8. AtlasSizeEstimation — Estimating optimal atlas texture dimensions before packing.
  9. AtlasPacking — Running the packing algorithm (MaxRects or Skyline) to place glyphs on atlas pages.
  10. AtlasEncoding — Encoding atlas pages to the target format (PNG, TGA, or DDS).
  11. ModelAssembly — Building the final BmFontModel with character, kerning, and metadata blocks.

Stages that are not applicable (e.g., no effects configured) will report Zero and are omitted from ToString() output.

public sealed class PipelineMetrics
Inheritance
PipelineMetrics
Inherited Members

Properties

AtlasEncoding

Time encoding atlas textures to PNG/TGA/DDS.

public TimeSpan AtlasEncoding { get; }

Property Value

TimeSpan

AtlasPacking

Time packing glyphs into atlas pages.

public TimeSpan AtlasPacking { get; }

Property Value

TimeSpan

AtlasSizeEstimation

Time estimating optimal atlas dimensions.

public TimeSpan AtlasSizeEstimation { get; }

Property Value

TimeSpan

CellEqualization

Time padding glyphs to equal cell heights.

public TimeSpan CellEqualization { get; }

Property Value

TimeSpan

CharsetResolution

Time matching requested characters to what the font has.

public TimeSpan CharsetResolution { get; }

Property Value

TimeSpan

EffectsCompositing

Time applying effects (outline, gradient, shadow).

public TimeSpan EffectsCompositing { get; }

Property Value

TimeSpan

FontParsing

Time reading and parsing the font file.

public TimeSpan FontParsing { get; }

Property Value

TimeSpan

ModelAssembly

Time building the final BMFont data model.

public TimeSpan ModelAssembly { get; }

Property Value

TimeSpan

PostProcessing

Time running custom post-processors.

public TimeSpan PostProcessing { get; }

Property Value

TimeSpan

Rasterization

Time rendering glyphs to bitmaps.

public TimeSpan Rasterization { get; }

Property Value

TimeSpan

SuperSampleDownscale

Time downscaling super-sampled glyphs.

public TimeSpan SuperSampleDownscale { get; }

Property Value

TimeSpan

Total

Total elapsed time across all stages.

public TimeSpan Total { get; }

Property Value

TimeSpan

Methods

ToString()

Prints a table of all stage timings with percentages.

public override string ToString()

Returns

string