Recursive AI

SixLabors.Fonts license: terms and build keys

Fonts 3.0 can require a build key even when Apache-2.0 applies. Font files you use with the library have their own terms.

SixLabors.Fonts 3.0.0 uses the Six Labors Split License. The license grants free use under Apache-2.0 for open-source or source-available software, transitive dependencies as defined by the license, and direct use by nonprofits, registered charities, or for-profit companies or individuals with less than US$1 million in annual gross revenue; other uses fall under the paid commercial license. Fonts 3.0 added a build-key check for direct references; the license text is unchanged from Fonts 2.1.3.

OneFont is a free, open-source font and text-shaping library for .NET from Recursive AI, licensed MIT OR Apache-2.0. NuGet · GitHub.

InstallNuGet
dotnet add package RecursiveAI.OneFont --version 1.4.0

Shape an OpenType run with OneFont

Program.cs.NET 10
using OneFont;
 
var face = FontFace.Load(File.ReadAllBytes("NotoSerif-Regular.ttf"));
var run = TextShaping.ShapeRun("office", face);
Console.WriteLine($"{face.FamilyName}: {face.UnitsPerEm} units/em");
Console.WriteLine($"6 characters, {run.Sum(c => c.Glyphs.Length)} glyphs");

If all you need is glyph selection and positioning, try this in a .NET 10 console project. Put this copy of Noto Serif Regular next to the project and run from that folder.

OutputOneFont 1.4.0
Noto Serif: 1000 units/em
6 characters, 4 glyphs

The font’s ligatures turn “ffi” into one glyph. The output is a shaped run, not a rendered image. Positions are in font units.

When the Split License grants Apache-2.0

Section 2 of the Six Labors Split License 1.0 (June 2022), as shipped with Fonts 3.0.0, lists four qualifying situations:

  • Use in software under an open-source or source-available license.
  • Use as a transitive package dependency. Section 1 defines this as object-form software installed indirectly by a third-party dependency unrelated to Six Labors.
  • Use as a direct dependency by a for-profit company or individual with less than US$1 million in annual gross revenue.
  • Use as a direct dependency by a nonprofit organization or registered charity.

The text puts other scenarios under the Six Labors Commercial License. At exactly US$1 million, the “less than” revenue criterion does not apply; check the other criteria separately. See Six Labors’ pricing and Community license options. Check the license on the exact release you ship rather than assuming the terms on a different version apply.

What the Fonts 3.0 build key changes

A project that directly references Fonts 3.0 can be eligible for Apache-2.0 and still fail its build if the key is missing. Six Labors’ build-key guide describes putting the supplied sixlabors.lic in or below the project directory, setting SixLaborsLicenseFile for another location, or supplying the full license contents via SixLaborsLicenseKey from a secret store. Set up CI as well as local builds.

If Fonts arrives through an unrelated third-party package and your project does not reference Fonts directly, the Fonts 3.0 announcement says the build-key check does not apply to you as a transitive consumer. Check each project’s direct references, not just whether Fonts appears in the restored dependency list.

The library license is not the font license

Neither package license tells you whether you can embed, modify, or redistribute a particular font file. The Noto Serif file above comes with its own SIL Open Font License. Review the terms that came with each font you deploy, even if you change shaping libraries.

When OneFont is a fit

OneFont’s shaping API covers OpenType substitutions and positioning, and the package exposes outlines and Unicode bidi and line-break information. It does not draw text, implement vertical layout, or produce color glyphs. If your app depends on Fonts 3.0’s color glyphs, hinting, or layout APIs such as hit testing and selection bounds, those are not interchangeable with ShapeRun. For a shaper-only switch, compare glyphs, advances, and cluster boundaries on the same fonts and strings before changing the rendering path.