Meziantou.Framework.Fonts 1.0.1

Prefix Reserved
dotnet add package Meziantou.Framework.Fonts --version 1.0.1
                    
NuGet\Install-Package Meziantou.Framework.Fonts -Version 1.0.1
                    
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="Meziantou.Framework.Fonts" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.Fonts" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.Fonts" />
                    
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 Meziantou.Framework.Fonts --version 1.0.1
                    
#r "nuget: Meziantou.Framework.Fonts, 1.0.1"
                    
#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 Meziantou.Framework.Fonts@1.0.1
                    
#: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=Meziantou.Framework.Fonts&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.Fonts&version=1.0.1
                    
Install as a Cake Tool

Meziantou.Framework.Fonts

The fully managed OpenType font reader and text shaper of Meziantou.Framework.Imaging and Meziantou.Framework.WebPlatform.

Its public API (FontLoader, FontFace, TextShaper, GlyphBuffer, ...) is the one these packages use: to load fonts and draw text, Meziantou.Framework.Imaging is the simpler entry point. The packages that use it depend on its exact version, so update them together.

What it covers:

  • TrueType and OpenType fonts and font collections, WOFF 1.0 and WOFF 2.0
  • TrueType, CFF and CFF2 outlines, variable fonts (fvar, avar 1 and 2, gvar, HVAR, VVAR, MVAR)
  • Color fonts: COLR versions 0 and 1, CPAL, sbix, CBDT
  • Horizontal and vertical metrics, BASE baselines
  • Text shaping with GSUB and GPOS, and the shaping models of complex scripts (Arabic, Hebrew, Indic, Khmer, Myanmar, Thai and Lao, Hangul, and the universal shaping engine)
  • The fonts installed on Windows, macOS and Linux (SystemFontCollection): an index of their faces by family and by name, read without loading the fonts, and the font matching of CSS to choose a face of a family

The types are in the Meziantou.Framework.Fonts namespace:

// The fonts of the machine are scanned once per process; only the tables that describe a face are read.
var fonts = SystemFontCollection.Default;
if (fonts.Match("Arial", weight: 700, isItalic: false) is { } face)
{
    using var stream = File.OpenRead(face.FilePath);
    var font = FontLoader.Load(stream, new PooledFontEnvironment(FontResourceLimits.Default, 64 * 1024 * 1024))[face.FaceIndex];
    Console.WriteLine($"{font.FamilyName} {font.SubfamilyName}: {font.UnitsPerEm} units per em");
}

The installed fonts are found in the fonts directory of Windows, in the fonts installed for the user and in the files the registry lists; in the Library/Fonts directories of macOS and in the fonts it downloads on demand; and on Linux in the directories of the configuration of fontconfig (fonts.conf and the files it includes) and in the XDG font directories. SystemFontCollection.Create indexes chosen directories instead.

It is written from the specifications and checked against HarfBuzz and FreeType.

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Meziantou.Framework.Fonts:

Package Downloads
Meziantou.Framework.Imaging

Fully managed, performance-oriented image library for .NET: PNG, APNG, GIF, JPEG, WebP, QOI, BMP, TGA, Netpbm, TIFF, ICO/CUR, ANI, AVIF, HEIC and JPEG 2000 decoding/encoding, JPEG XL decoding and lossless/lossy encoding, lossless JPEG recompression as JPEG XL, animation-aware processing, vector drawing, ICC color conversion, and bounded-memory streaming.

Meziantou.Framework.WebPlatform

Spec-compliant HTML, XML, SVG and CSS parser exposing the browser DOM API (WHATWG DOM, HTML, URL, Encoding, Selectors, CSSOM, DOM XPath).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 83 10/21/2026
1.0.0 105 10/19/2026