Skip to content

RasterizerBackend.Native is undocumented and always unregistered #146

Description

@vchelaru

Summary

KernSmith.RasterizerBackend (v0.15.2, still present in v0.15.3) has 5 members:

public enum RasterizerBackend
{
    FreeType,
    Gdi,
    DirectWrite,
    StbTrueType,
    Native,
}

Native has no backing implementation and is never registered:

  • No KernSmith.Rasterizers.* package exists for it on NuGet (checked all packages under the kaltinril/Kernsmith publisher).
  • The core KernSmith package (checked 0.15.2 and 0.15.3) has no IRasterizer implementer for it.
  • RasterizerFactory.IsRegistered(RasterizerBackend.Native) returns false, and RasterizerFactory.Create(RasterizerBackend.Native) throws:

    Rasterizer backend 'Native' is not registered. Available backends: FreeType, Gdi, StbTrueType. Install the corresponding NuGet package (e.g., KernSmith.Rasterizers.StbTrueType) and ensure it is referenced by your project.

  • README.md, CHANGELOG.md, and COMPARISON.md only document/list FreeType, GDI, DirectWrite, and StbTrueType — Native isn't mentioned anywhere (the only "native" hits are unrelated: Native AOT, native bold/italic face lookup, etc).

The enum's own XML doc summary says: "Native KernSmith rasterizer. Pure C#, cross-platform. No external dependencies." — which reads like a planned built-in backend that was never shipped, but there's no way to tell from the outside whether it's coming, abandoned, or a mistake.

Repro

using KernSmith.Rasterizer;

RasterizerFactory.IsRegistered(RasterizerBackend.Native); // false
RasterizerFactory.Create(RasterizerBackend.Native);       // throws "not registered"

Ask

Either:

  1. Document Native (README backend table + XML doc) as planned/experimental with a status, or
  2. Remove it from the enum until it has a real implementation, since right now it's a silent trap — it type-checks and compiles but always fails at runtime with no indication in the docs of why.

Environment

  • KernSmith 0.15.2 / 0.15.3
  • net8.0-windows7.0, Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions