gum-kernsmith-integrations
Skill659 starsChanged 2 months agoMITView on GitHub
KernSmith runtime bitmap-font packages. Triggers: Integrations/KernSmith, KernSmith.MonoGameGum, KernSmith.RaylibGum, KernSmith.KniGum, KernSmith.FnaGum, KernSmith.GumCommon, InMemoryFontCreator.
In this repository69 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debuggingSkill
- frb-build-verificationSkill
- frb-pixel-harnessSkill
- gum-architecture-layersSkill
- gum-bundleSkill
- gum-cliSkill
- gum-cross-platform-unificationSkill
- gum-docs-writingSkill
- gum-file-pathsSkill
- gum-forms-behaviorsSkill
- gum-forms-controlsSkill
- gum-forms-default-visualsSkill
- gum-forms-itemscontrolSkill
- gum-forms-theme-importSkill
- gum-iconsSkill
- gum-issue-creationSkill
- gum-layout-engineSkill
- gum-layoutSkill
- gum-localizationSkill
- gum-monogame-renderingSkill
- gum-monthly-releaseSkill
- gum-project-versioningSkill
- gum-property-assignmentSkill
- gum-raylib-renderingSkill
- gum-releaseSkill
- gum-runtime-animation-chainsSkill
- gum-runtime-bindingSkill
- gum-runtime-fontsSkill
- gum-runtime-hot-reloadSkill
- gum-runtime-syntax-versionSkill
- gum-runtime-systemmanagers-initSkill
- gum-runtime-topologySkill
- gum-runtime-variable-referencesSkill
- gum-samplesSkill
- gum-serviceSkill
- gum-source-linked-projectSkill
- gum-themingSkill
- gum-tool-animationsSkill
- gum-tool-codegenSkill
- gum-tool-copy-pasteSkill
- gum-tool-delete-logicSkill
- gum-tool-dialogsSkill
- gum-tool-errorsSkill
- gum-tool-file-watchSkill
- gum-tool-font-generationSkill
- gum-tool-import-from-gumxSkill
- gum-tool-loggingSkill
- gum-tool-outputSkill
- gum-tool-pluginsSkill
- gum-tool-save-classesSkill
- gum-tool-screenshotsSkill
- gum-tool-selectionSkill
- gum-tool-tree-viewSkill
- gum-tool-undoSkill
- gum-tool-variable-gridSkill
- gum-tool-variable-referencesSkill
- gum-tool-viewmodelsSkill
- gum-unit-testsSkill
- gum-variable-deep-diveSkill
- The first 60 shown.
The file
Files
KernSmith Integrations
KernSmith is a third-party, cross-platform, in-memory BMFont rasterizer. Integrations/KernSmith/* are optional first-party Gum packages that bridge it into each runtime. The tool itself also uses KernSmith directly as an alternate offline generator backend — see gum-tool-font-generation for that (KernSmithFileGenerator, unrelated to the runtime packages below).
Package map
| Package | Role |
KernSmith.GumCommon | Shared mapping layer: Gum's BmfcSave → KernSmith's FontGeneratorOptions |
KernSmith.MonoGameGum | MonoGame IRuntimeFontCreator-style wiring, produces BitmapFont |
KernSmith.KniGum / KernSmith.FnaGum | Same shape, KNI/FNA targets |
KernSmith.RaylibGum | KernSmithRaylibFontCreator, produces Raylib_cs.Font |
Each platform package plugs into CustomSetPropertyOnRenderable.InMemoryFontCreator (a game project sets this at startup) so Gum rasterizes fonts on the fly instead of loading pre-generated .fnt/.png files.
Gotcha
These are opt-in NuGet add-ons a game project references directly — Gum does not wire one up by default. If InMemoryFontCreator is never set, Gum falls back to the tool's pre-generated bmfont.exe pipeline. Seeing a KernSmith.* package reference alongside Gum.MonoGame/etc. in a user's .csproj is expected, not a conflicting fork.
Rasterizer backend gotcha (wasm/AOT)
KernSmith picks a glyph rasterizer via RasterizerBackend, each backend its own opt-in NuGet package (KernSmith.Rasterizers.FreeType/Gdi/DirectWrite.TerraFX/StbTrueType) so a consumer only pays for the one it needs — see the KernSmith README. Gum's KernSmith.GumCommon references only FreeType (upstream's default, and native-only). StbTrueType is the sole pure-C# backend and the only one that runs on browser-wasm/AOT, but no Gum KernSmith.* package references it — a wasm consumer must add KernSmith.Rasterizers.StbTrueType themselves, and separately call RuntimeHelpers.RunClassConstructor(typeof(StbTrueTypeRasterizer).TypeHandle) before using it, since KernSmith's reflection-based backend auto-discovery is trimmed away under wasm/AOT publish (silent "backend is not registered" failure otherwise). Any fix that wires this into Gum's own packages must condition both the reference and the call on the browser-wasm RID — adding it unconditionally defeats the per-backend package split's whole purpose.
GumFontGenerator.Generate throws PlatformNotSupportedException when called on browser-wasm with no explicit backend argument, instead of leaving the failure to KernSmith or a silent fallback — see GumFontGenerator.IsBrowserPlatform (test seam for OperatingSystem.IsBrowser).
Mobile builds and package references
KernSmith.GumCommon and KernSmith.MonoGameGum add net9.0-ios / net9.0-android behind the same IncludeIOS / IncludeAndroid opt-in as MonoGameGum.csproj. The mobile builds reference KernSmith.Rasterizers.StbTrueType instead of FreeType (its native library does not link on iOS), and GumFontGenerator.GetPlatformDefaultBackend makes StbTrueType the default there. GumFontGenerator force-runs the StbTrueType static constructor whenever the resolved backend is StbTrueType, passed or defaulted, because trimmed builds drop KernSmith's backend discovery.
A packed project must reference an engine platform package (MonoGame.Framework.*, nkast.*) with PrivateAssets="All", or every consumer restores a second MonoGame. Tests/Gum.RepoHygiene.Tests/PackedPlatformPackageTests.cs enforces it, and KernSmithMobilePackagingTests.cs pins the mobile conditions, since the mobile TFMs cannot be built without workloads.
See docs/code/files-and-fonts/font-strategies.md for the user-facing font strategy comparison.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

