NeoKolors.Tui.Fonts.Assets
2026.2.0-rc2.1
dotnet add package NeoKolors.Tui.Fonts.Assets --version 2026.2.0-rc2.1
NuGet\Install-Package NeoKolors.Tui.Fonts.Assets -Version 2026.2.0-rc2.1
<PackageReference Include="NeoKolors.Tui.Fonts.Assets" Version="2026.2.0-rc2.1" />
<PackageVersion Include="NeoKolors.Tui.Fonts.Assets" Version="2026.2.0-rc2.1" />
<PackageReference Include="NeoKolors.Tui.Fonts.Assets" />
paket add NeoKolors.Tui.Fonts.Assets --version 2026.2.0-rc2.1
#r "nuget: NeoKolors.Tui.Fonts.Assets, 2026.2.0-rc2.1"
#:package NeoKolors.Tui.Fonts.Assets@2026.2.0-rc2.1
#addin nuget:?package=NeoKolors.Tui.Fonts.Assets&version=2026.2.0-rc2.1&prerelease
#tool nuget:?package=NeoKolors.Tui.Fonts.Assets&version=2026.2.0-rc2.1&prerelease
NeoKolors.Tui.Fonts.Assets
NeoKolors.Tui.Fonts.Assets contains the default font definitions and a packaging mechanism for the NeoKolors TUI framework. It provides pre-compiled, out-of-the-box fonts embedded directly into the compiled library and exposes an easy mechanism to load and register them.
Built-in Fonts
The package includes three default font designs:
- Bytesized: A clean, compact pixel-art styled font ideal for dense information layouts.
- Future: A modern, wide stylized font featuring high-tech and futuristic geometry.
- Dummy: A fallback/skeleton font representation used primarily for testing, debugging, and baseline verification.
Architecture & Built-in Compilation
Instead of checking in large pre-compiled binary resources, this project structures fonts in human-readable XML format during development.
Font Directory Structure
Each font under the project directory (e.g., Bytesized/) consists of:
manifest.nkfont: Links the config file and the map file.Config.xml: Configures variables like letter spacing, word spacing, ligatures, leading, baseline, and alignment markers.Map.xml: Maps character symbols/ligatures to specific.nkgglyph files..nkgFiles: Plain-text files containing ASCII art representations of character glyph layouts and their alignment points.
MSBuild Compilation Pipeline
On building the project, a custom MSBuild Target (CompileBuiltinFonts) executes:
- It reflects into the compiled
NeoKolors.Tui.Fonts.dllassembly to locate the custom compiler task. - It processes the raw XML definitions and
.nkgglyph files insideBytesized,Future, andDummy. - It validates the configuration and generates compiled MessagePack binary files (
Bytesized.nkf,Future.nkf, andDummy.nkf). - These binary files are dynamically added as
EmbeddedResourcefiles inside the target assembly.
Usage
AssetsProvider
The AssetsProvider class provides runtime access to these embedded assets.
1. Automatic Font Registration
If the compiler constant NK_FONTS_ENABLE_AUTO_REGISTRATION is defined in your build configuration, AssetsProvider uses a C# [ModuleInitializer] to automatically register all three built-in fonts into the FontAtlas when the assembly is loaded.
2. Manual Registration
To manually load and register these fonts into the global FontAtlas:
using NeoKolors.Tui.Fonts.Assets;
// Registers "Bytesized", "Future", and "Dummy"
AssetsProvider.RegisterFonts();
3. Direct Font Access
You can retrieve the deserialized NKFont instances directly:
using NeoKolors.Tui.Fonts;
using NeoKolors.Tui.Fonts.Assets;
NKFont? futureFont = AssetsProvider.Future;
NKFont? bytesizedFont = AssetsProvider.Bytesized;
if (futureFont != null)
{
// Ready for measurement or rendering
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- NeoKolors.Tui.Fonts (>= 2026.2.0-rc2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NeoKolors.Tui.Fonts.Assets:
| Package | Downloads |
|---|---|
|
NeoKolors.Tui
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.2.0-rc2.1 | 87 | 6/5/2026 |
| 2026.2.0-rc2 | 65 | 6/4/2026 |
| 2026.2.0-rc1 | 77 | 6/2/2026 |