Table of Contents

Enum RasterizerBackend

Namespace
KernSmith
Assembly
KernSmith.dll

Which rasterizer backend to use for glyph rendering.

public enum RasterizerBackend

Fields

DirectWrite = 2

DirectWrite rasterizer. Windows-only, high quality.

FreeType = 0

FreeType rasterizer. Cross-platform, full-featured.

Gdi = 1

GDI rasterizer. Windows-only.

Native = 4

Native KernSmith rasterizer. Pure C#, cross-platform, no external dependencies.

Experimental, and not published to NuGet yet. The backend renders TrueType (glyf) and CFF/CFF2 (.otf) outlines, variable-font instances, COLR version 0 and 1 color glyphs and CBDT/sbix color bitmaps, synthetic bold/italic, SDF and multi-channel MSDF/MTSDF, with None, Grayscale, Light (its own vertical-only auto-hinting) and Lcd anti-aliasing. It is the only backend that draws Vector outlines and honors WidthPercent and ItalicAngle. It is supplied by the KernSmith.Rasterizers.Native project, which currently ships only in the KernSmith repository and CLI. Until that package is released, Create(RasterizerBackend) throws for this value in apps built against the NuGet packages.

Limitations: no TrueType bytecode hinting (and no hinting outside Light) and no system-font lookup. Use FreeType for hinting, Gdi or DirectWrite for system fonts.

StbTrueType = 3

StbTrueType rasterizer. Pure C#, cross-platform. No native dependencies.