Namespace KernSmith
Classes
- AtlasPackingException
Thrown when glyphs don't fit in the texture atlas. Try a larger max texture size.
- AtlasSizeConstraints
Constraints applied to atlas dimensions after size estimation.
- AtlasTargetRegion
Defines a rectangular region within an existing PNG image where glyphs will be rendered.
- BatchJob
Describes a single font generation job within a batch. Exactly one font source (FontData, FontPath, or SystemFont) should be specified.
- BatchOptions
Options controlling batch font generation behavior.
- BmFont
The main API for generating and loading BMFont bitmap fonts.
- BmFontBuilder
Fluent builder for configuring and generating bitmap fonts.
- BmFontException
Base error type for all KernSmith operations. Catch this to handle any bitmap font generation error.
- BmfcConfig
Holds the result of reading a font-generation configuration file. This is the shared model for both the BMFont/AngelCode
.bmfcand libGDX Hiero.hieroformats (see ConfigFormatFactory). Combines FontGeneratorOptions with font source and output path information that lives outside the options type.
- BmfcConfigReader
Reads BMFont/AngelCode
.bmfcconfiguration files (flat key=value format) into BmfcConfig. This reader is BMFont-specific; to read either a.bmfcor a libGDX Hiero.hierofile with automatic content-based format detection, use ReadConfig(string) instead.
- BmfcConfigWriter
Serializes BmfcConfig to the standard BMFont/AngelCode
.bmfcflat key=value format. To write the libGDX Hiero.hieroformat use HieroConfigWriter, or let WriteConfig(BmfcConfig, string) pick the writer based on the file extension.
- ChannelConfig
Configures what each RGBA channel contains in the atlas texture. Matches BMFont.exe's per-channel export settings.
- CharacterSet
Defines which Unicode characters to include in the generated bitmap font.
- ConfigFormatFactory
Dispatches config read/write operations to the correct format implementation. ReadConfig(string) auto-detects the format by inspecting the file CONTENT, falling back to the extension only when the content is inconclusive. WriteConfig(BmfcConfig, string) selects by extension (
.hieroselects Hiero; any other extension, including none, selects BMFont).
- CustomGlyph
A custom glyph image that replaces or adds a glyph in the font. You must decode images to raw pixels yourself before passing them here.
- FontCache
Thread-safe cache for font data bytes, supporting file paths, system fonts, and raw data.
- FontGeneratorOptions
All the settings for generating a BMFont. Sensible defaults are provided.
- FontParsingException
Thrown when a font file can't be read -- for example, a corrupt or unsupported TTF/OTF.
- HieroConfigReader
Reads Hiero
.hieroconfiguration files (flat key=value format) into BmfcConfig. Maps Hiero properties and effect blocks onto KernSmith FontGeneratorOptions.
- HieroConfigWriter
Serializes BmfcConfig to Hiero
.hieroflat key=value format. Effects are emitted in a fixed canonical order for stable round-trips: ColorEffect, OutlineEffect, GradientEffect, ShadowEffect, DistanceFieldEffect.
- PipelineMetrics
Timing breakdown for each stage of the font generation pipeline. Enable with CollectMetrics or
BmFontBuilder.WithCollectMetrics(), then readBmFontResult.Metrics.Stages are recorded in pipeline order:
- FontParsing — Reading and parsing the TTF/OTF/WOFF font file (tables, metrics, kerning).
- CharsetResolution — Resolving requested characters against the font's available codepoints.
- Rasterization — Rendering each glyph to a bitmap via FreeType (or custom rasterizer).
- EffectsCompositing — Applying layered effects: outline, gradient, and shadow.
- PostProcessing — Running user-supplied IGlyphPostProcessor instances.
- SuperSampleDownscale — Downscaling glyphs rendered at Nx resolution back to target size.
- CellEqualization — Padding glyph cells to equal height when EqualizeCellHeights is enabled.
- AtlasSizeEstimation — Estimating optimal atlas texture dimensions before packing.
- AtlasPacking — Running the packing algorithm (MaxRects or Skyline) to place glyphs on atlas pages.
- AtlasEncoding — Encoding atlas pages to the target format (PNG, TGA, or DDS).
- 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.
- RasterizationException
Thrown when a glyph can't be rendered from the font.
Structs
- Padding
Padding around each glyph in the atlas, in pixels.
- Spacing
Gap between glyphs in the atlas, in pixels.
Enums
- AntiAliasMode
How glyphs are anti-aliased when rendered.
- BatchAtlasMode
Controls how atlas textures are generated during batch font generation.
- ChannelContent
Specifies what content a single RGBA channel holds in the atlas texture. Values match the BMFont specification for the common block channel fields.
- OutputFormat
Output format for BMFont descriptor files.
- PackingAlgorithm
Which algorithm to use for fitting glyphs into atlas pages.
- PixelFormat
Pixel format for glyph bitmaps and atlas pages.
- RasterizerBackend
Which rasterizer backend to use for glyph rendering.
- TextureFormat
Texture format for atlas output images.