HarfBuzzSharp 14.2.1.201

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.

Showing the top 20 packages that depend on HarfBuzzSharp.

Packages Downloads
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
49
HarfBuzzSharp.NativeAssets.Linux
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
43
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
41
HarfBuzzSharp.NativeAssets.Linux
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
41
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
41
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
40
Avalonia.HarfBuzz
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
40
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
40
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
39
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
39
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, MacOS and with experimental support for Android, iOS and WebAssembly.
38
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
38
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, MacOS and with experimental support for Android, iOS and WebAssembly.
38
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
37
Avalonia.Skia
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, MacOS and with experimental support for Android, iOS and WebAssembly.
37
Avalonia.HarfBuzz
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
37
Avalonia.Direct2D1
Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.
37

Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release notes.

.NET 10.0

.NET 10.0

.NET 10.0

.NET 10.0

.NET 10.0

.NET 10.0

.NET 10.0

.NET 10.0

.NET Framework 4.6.2

.NET Framework 4.8

.NET 6.0

.NET 6.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET 9.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
14.2.1.400-preview.1.26454.9 10 09/06/2026
14.2.1.300-rc.1.26456.2 4 09/18/2026
14.2.1.300-preview.1.26454.6 9 09/05/2026
14.2.1.201 5 09/18/2026
14.2.1.200 9 09/10/2026
14.2.1.200-rc.1.26426.14 12 08/28/2026
14.2.1.103 4 09/18/2026
14.2.1.102 11 09/03/2026
14.2.1.3 11 09/03/2026
14.2.1.2 14 08/07/2026
14.2.1.1 16 07/15/2026
14.2.1 18 07/12/2026
14.2.1-rc.1.1 15 06/30/2026
14.2.1-preview.2.1 17 06/27/2026
14.2.1-preview.1.1 16 07/05/2026
14.2.0 13 06/24/2026
14.2.0-rc.1.2 16 06/16/2026
14.2.0-preview.1.1 13 06/17/2026
8.3.1.6-preview.3.1 15 05/28/2026
8.3.1.6-preview.2.1 22 05/14/2026
8.3.1.6-preview.1.1 36 04/30/2026
8.3.1.5 22 05/26/2026
8.3.1.5-preview.1.1 38 04/27/2026
8.3.1.4-preview.1.1 47 02/12/2026
8.3.1.3 42 02/08/2026
8.3.1.3-preview.3.1 48 02/07/2026
8.3.1.3-preview.2.3 55 01/27/2026
8.3.1.3-preview.1 47 12/13/2025
8.3.1.2 41 12/14/2025
8.3.1.2-preview.1 42 12/14/2025
8.3.1.1 49 12/14/2025
8.3.1.1-stable.1 42 12/14/2025
8.3.1.1-preview.1.2 45 12/13/2025
8.3.1-preview.2.3 48 12/12/2025
8.3.1-preview.1.2 38 12/14/2025
8.3.0.1 47 12/17/2025
8.3.0 45 12/14/2025
8.3.0-preview.6.1 37 12/14/2025
8.3.0-preview.5.4 48 12/13/2025
8.3.0-preview.4.1 45 12/13/2025
8.3.0-preview.3.1 42 12/14/2025
8.3.0-preview.2.1 43 12/14/2025
8.3.0-preview.1.8 48 12/14/2025
8.3.0-preview.0.132 40 12/14/2025
7.3.0.3 48 12/14/2025
7.3.0.3-preview.2.2 46 12/14/2025
7.3.0.3-preview.1.1 39 12/14/2025
7.3.0.2 45 12/14/2025
7.3.0.2-preview.1.1 46 12/14/2025
7.3.0.1 42 12/13/2025
7.3.0 47 12/14/2025
7.3.0-preview.1.2 49 12/14/2025
2.8.2.5 37 12/14/2025
2.8.2.4 42 12/10/2025
2.8.2.4-preview.96 49 12/14/2025
2.8.2.4-preview.95 45 12/14/2025
2.8.2.4-preview.89 48 12/13/2025
2.8.2.4-preview.84 39 12/14/2025
2.8.2.4-preview.82 40 12/14/2025
2.8.2.4-preview.76 42 12/14/2025
2.8.2.4-preview.70 42 12/14/2025
2.8.2.3 54 12/14/2025
2.8.2.2 43 12/14/2025
2.8.2.2-preview.8 45 12/14/2025
2.8.2.1 49 12/14/2025
2.8.2.1-preview.108 35 12/14/2025
2.8.2.1-preview.104 41 12/14/2025
2.8.2.1-preview.91 53 12/14/2025
2.8.2.1-preview.79 54 12/14/2025
2.8.2.1-preview.75 45 12/14/2025
2.8.2.1-preview.71 46 12/14/2025
2.8.2.1-preview.63 42 12/14/2025
2.8.2.1-preview.1 36 12/14/2025
2.8.2 41 12/14/2025
2.8.2-preview.266 49 12/14/2025
2.8.2-preview.256 44 12/14/2025
2.8.2-preview.254 39 12/14/2025
2.8.2-preview.232 41 12/14/2025
2.8.2-preview.209 43 12/14/2025
2.8.2-preview.187 51 12/14/2025
2.8.2-preview.179 49 12/14/2025
2.8.2-preview.178 46 12/14/2025
2.8.2-preview.155 43 12/14/2025
2.8.2-preview.152 62 12/14/2025
2.8.2-preview.150 43 12/14/2025
2.8.2-preview.145 42 12/13/2025
2.8.2-preview.140 52 12/14/2025
2.8.2-preview.139 58 12/14/2025
2.8.2-preview.127 65 12/14/2025
2.6.1.9 57 12/14/2025
2.6.1.9-preview.120 50 12/14/2025
2.6.1.9-preview.9 44 12/20/2025
2.6.1.9-preview.6 46 12/14/2025
2.6.1.9-preview.5 43 12/20/2025
2.6.1.9-preview.2 49 12/20/2025
2.6.1.8 45 12/14/2025
2.6.1.8-preview.93 52 12/20/2025
2.6.1.8-preview.90 41 12/20/2025
2.6.1.8-preview.61 39 12/16/2025
2.6.1.7 48 12/14/2025
2.6.1.7-preview.40 39 12/20/2025
2.6.1.7-preview.36 40 12/20/2025
2.6.1.7-preview.33 64 12/13/2025
2.6.1.7-preview.24 54 12/13/2025
2.6.1.7-preview.18 35 12/14/2025
2.6.1.6 40 12/14/2025
2.6.1.6-preview.19 52 12/20/2025
2.6.1.6-preview.18 44 12/17/2025
2.6.1.6-preview.9 50 12/20/2025
2.6.1.5 49 12/14/2025
2.6.1.5-preview.33 44 12/20/2025
2.6.1.5-preview.24 52 12/20/2025
2.6.1.5-preview.14 45 12/14/2025
2.6.1.5-preview.12 61 12/15/2025
2.6.1.5-preview.3 49 12/10/2025
2.6.1.4 48 12/14/2025
2.6.1.4-preview.2 48 12/20/2025
2.6.1.3 41 12/14/2025
2.6.1.2 45 01/01/2026
2.6.1.1 45 12/14/2025
2.6.1.1-preview.60 48 12/12/2025
2.6.1.1-preview.50 68 12/14/2025
2.6.1.1-preview.45 44 12/18/2025
2.6.1.1-preview.43 53 12/20/2025
2.6.1.1-preview.39 42 12/14/2025
2.6.1.1-preview.29 46 12/20/2025
2.6.1.1-preview.21 60 12/20/2025
2.6.1.1-preview.17 34 12/14/2025
2.6.1.1-preview.9 55 12/09/2025
2.6.1 48 12/13/2025
2.6.1-rc.172 41 12/14/2025
2.6.1-rc.170 43 12/11/2025
2.6.1-rc.169 44 01/01/2026
2.6.1-rc.165 47 01/01/2026
2.6.1-rc.153 45 12/17/2025
2.5.3-rc.147 39 12/14/2025
1.4.6.2 47 12/14/2025
1.4.6.2-preview28 46 12/14/2025
1.4.6.1 48 12/12/2025
1.4.6 44 12/14/2025
1.4.5 45 12/14/2025