SlugText-Sharp 0.1.2

dotnet add package SlugText-Sharp --version 0.1.2
                    
NuGet\Install-Package SlugText-Sharp -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SlugText-Sharp" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SlugText-Sharp" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="SlugText-Sharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SlugText-Sharp --version 0.1.2
                    
#r "nuget: SlugText-Sharp, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SlugText-Sharp@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SlugText-Sharp&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=SlugText-Sharp&version=0.1.2
                    
Install as a Cake Tool

SlugText-Sharp

Slug is now open source, and SlugText-Sharp is a 100% C# implementation of Slug-style .slug ("SLUGGISH") generation.

The core library is intentionally minimal and depends on:

  • FreeTypeSharp

Context

What This Library Provides

  • Compile .ttf / .otf fonts to .slug binaries.
  • Restrict generation to custom charsets (ASCII, extended ASCII, CJK, Korean, etc.).
  • Validate generated binary structure.
  • Optional progress + timing callbacks for profiling generation steps.

Install

dotnet add package SlugText-Sharp

Quick Start (Core)

using SlugSharp.Core;

var result = SlugCompiler.CompileWithReport(
    fontPath: "fonts/SpaceMono-Regular.ttf",
    options: new GeneratorOptions { BandCount = 16 },
    validateOutput: true);

File.WriteAllBytes("SpaceMono.slug", result.Bytes);
Console.WriteLine($"Generated in {result.Report.TotalMilliseconds} ms");

CLI Usage

dotnet run --project SlugSharp.CLI -- <fontPath> <outputPath> [options]

Common options:

  • --full-range
  • --whitelist=32,65,66
  • --charset-file=charset.txt
  • --validate-charset
  • --print-charset
  • --progress
  • --progress-interval=100
  • --timings

Example:

dotnet run --project SlugSharp.CLI -- fonts/SpaceMono-Regular.ttf out.slug --charset-file=fonts/test_fonts/charsets/eascii_korean.txt --progress --timings

Test Your Generated .slug Files

If you want to quickly inspect and test generated sluggish files in browser:

You can load .slug files generated by this C# library directly in that demo.

Documentation

License

This project is licensed under MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 97 4/11/2026
0.1.1 92 4/11/2026