Skip to main content
net10.0net10.0-android36.0net10.0-ios26.0net10.0-maccatalyst26.0net10.0-macos26.0net10.0-tizen10.0

HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.

Published
Sep 29, 2026
20d ago
Total Downloads
98.7M
98,718,470

Install

dotnet add package HarfBuzzSharp --version 14.2.1.400-preview.2.26471.11
ProductVersions
.NET
net10.0net10.0-android36.0net10.0-ios26.0net10.0-maccatalyst26.0net10.0-macos26.0net10.0-tizen10.0net10.0-tvos26.0net10.0-windows10.0.19041net6.0net6.0-tizen8.0net9.0net9.0-android35.0net9.0-ios18.0net9.0-maccatalyst18.0net9.0-macos15.0net9.0-tizen8.0net9.0-tvos18.0net9.0-windows10.0.19041
.NET Standard
netstandard2.0netstandard2.1
Other
.NETFramework4.6.2.NETFramework4.8

README

HarfBuzzSharp

NuGet NuGet downloads License: MIT

HarfBuzzSharp provides .NET bindings for the HarfBuzz OpenType text shaping engine. It converts Unicode text into correctly selected and positioned glyphs for complex scripts, ligatures, kerning, variable fonts, bidirectional text, and advanced typographic features.

Capabilities

  • Shape text for Arabic, Indic, Southeast Asian, and other complex writing systems.
  • Apply OpenType features, language, script, and direction settings.
  • Inspect glyph IDs, clusters, advances, and offsets.
  • Read OpenType variation axes, names, metrics, color glyph data, and layout information.
  • Run on Windows, macOS, Linux, Android, iOS, Mac Catalyst, tvOS, Tizen, and WebAssembly.
  • Integrate with SkiaSharp rendering through SkiaSharp.HarfBuzz.

Get started

Install the package:

dotnet add package HarfBuzzSharp

Shape a string using an OpenType font:

using HarfBuzzSharp;

using var blob = Blob.FromFile("NotoSansArabic-Regular.ttf");
using var face = new Face(blob, 0);
using var font = new Font(face);
font.SetScale(face.UnitsPerEm, face.UnitsPerEm);

using var buffer = new HarfBuzzSharp.Buffer();
buffer.AddUtf8("مرحبا بالعالم");
buffer.GuessSegmentProperties();

font.Shape(buffer);

foreach (var glyph in buffer.GlyphInfos)
    Console.WriteLine($"Glyph {glyph.Codepoint}, cluster {glyph.Cluster}");

For drawing shaped text with SkiaSharp, install SkiaSharp.HarfBuzz and use SKShaper:

dotnet add package SkiaSharp.HarfBuzz

Linux and WebAssembly: add the matching HarfBuzzSharp.NativeAssets.* package directly to the application project when the target does not receive native assets transitively. See the package deployment guide.

Documentation and resources

Feedback and contributing

HarfBuzzSharp is part of the open-source SkiaSharp project from Microsoft. Use GitHub Discussions for questions, file bugs and feature requests in the issue tracker, and read the contributing guide to get involved.

HarfBuzzSharp is released under the MIT license.

Changes from Previous Version

No structural changes between v14.2.1.400-preview.1.26454.9 and v14.2.1.400-preview.2.26471.11.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 22 target frameworks; confirm the exact target used by your application.The published metadata declares 33 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.