Enum RasterizerBackend
- Namespace
- KernSmith
- Assembly
- KernSmith.dll
Which rasterizer backend to use for glyph rendering.
public enum RasterizerBackend
Fields
DirectWrite = 2DirectWrite rasterizer. Windows-only, high quality.
FreeType = 0FreeType rasterizer. Cross-platform, full-featured.
Gdi = 1GDI rasterizer. Windows-only.
Native = 4Native 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,COLRversion 0 and 1 color glyphs andCBDT/sbixcolor 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 theKernSmith.Rasterizers.Nativeproject, 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 = 3StbTrueType rasterizer. Pure C#, cross-platform. No native dependencies.