HarfBuzzSharp 14.4.0.3

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.
58
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.
54
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.
52
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.
52
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.
51
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.
51
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.
50
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.
50
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.
50
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.
49
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.
49
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
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.
48
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.
48
HarfBuzzSharp.NativeAssets.Linux
HarfBuzzSharp is a cross-platform OpenType text shaping engine for .NET platforms.
48
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.
47

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
15.0.0.100-rc.2.26576.7 1 11/27/2026
15.0.0.100-rc.1.26567.13 11 11/18/2026
15.0.0.100-preview.1.26563.22 22 11/15/2026
15.0.0 1 11/27/2026
15.0.0-rc.1.26567.14 10 11/18/2026
15.0.0-preview.3.26563.17 21 11/15/2026
15.0.0-preview.2.26560.5 26 11/11/2026
14.4.0.300-preview.1.26556.2 21 11/10/2026
14.4.0.201 1 11/27/2026
14.4.0.200 8 11/18/2026
14.4.0.200-rc.2.26563.19 9 11/16/2026
14.4.0.200-rc.1.26560.6 11 11/11/2026
14.4.0.200-preview.1.26556.1 16 11/07/2026
14.4.0.103 1 11/27/2026
14.4.0.102 7 11/18/2026
14.4.0.101 22 11/15/2026
14.4.0.100 14 11/11/2026
14.4.0.100-rc.1.26553.11 15 11/06/2026
14.4.0.100-preview.1.26512.10 22 10/15/2026
14.4.0.3 1 11/27/2026
14.4.0.2 17 11/18/2026
14.4.0.1 12 11/15/2026
14.4.0 20 11/06/2026
14.4.0-rc.1.26512.8 31 10/15/2026
14.4.0-preview.2.26479.13 26 09/30/2026
14.2.1.500-preview.1.26471.14 27 09/29/2026
14.2.1.401 24 11/06/2026
14.2.1.400 22 10/28/2026
14.2.1.400-rc.1.26479.14 23 10/01/2026
14.2.1.400-preview.2.26471.11 31 09/29/2026
14.2.1.400-preview.1.26454.9 29 09/06/2026
14.2.1.303 24 11/06/2026
14.2.1.302 18 10/28/2026
14.2.1.301 31 09/30/2026
14.2.1.300 29 09/29/2026
14.2.1.300-rc.1.26456.2 31 09/18/2026
14.2.1.300-preview.1.26454.6 25 09/05/2026
14.2.1.205 19 11/06/2026
14.2.1.204 23 10/28/2026
14.2.1.203 30 09/30/2026
14.2.1.202 23 09/29/2026
14.2.1.201 27 09/18/2026
14.2.1.200 30 09/10/2026
14.2.1.200-rc.1.26426.14 29 08/28/2026
14.2.1.106 17 11/06/2026
14.2.1.105 30 09/30/2026
14.2.1.104 22 09/29/2026
14.2.1.103 27 09/18/2026
14.2.1.102 24 09/03/2026
14.2.1.7 19 10/31/2026
14.2.1.6 19 11/06/2026
14.2.1.5 28 09/30/2026
14.2.1.4 25 09/29/2026
14.2.1.3 28 09/03/2026
14.2.1.2 27 08/07/2026
14.2.1.1 28 07/15/2026
14.2.1 38 07/12/2026
14.2.1-rc.1.1 32 06/30/2026
14.2.1-preview.2.1 28 06/27/2026
14.2.1-preview.1.1 29 07/05/2026
14.2.0 26 06/24/2026
14.2.0-rc.1.2 34 06/16/2026
14.2.0-preview.1.1 31 06/17/2026
8.3.1.6-preview.3.1 27 05/28/2026
8.3.1.6-preview.2.1 36 05/14/2026
8.3.1.6-preview.1.1 57 04/30/2026
8.3.1.5 34 05/26/2026
8.3.1.5-preview.1.1 59 04/27/2026
8.3.1.4-preview.1.1 62 02/12/2026
8.3.1.3 55 02/08/2026
8.3.1.3-preview.3.1 60 02/07/2026
8.3.1.3-preview.2.3 65 01/27/2026
8.3.1.3-preview.1 55 12/13/2025
8.3.1.2 50 12/14/2025
8.3.1.2-preview.1 56 12/14/2025
8.3.1.1 64 12/14/2025
8.3.1.1-stable.1 52 12/14/2025
8.3.1.1-preview.1.2 57 12/13/2025
8.3.1-preview.2.3 60 12/12/2025
8.3.1-preview.1.2 51 12/14/2025
8.3.0.1 58 12/17/2025
8.3.0 57 12/14/2025
8.3.0-preview.6.1 47 12/14/2025
8.3.0-preview.5.4 61 12/13/2025
8.3.0-preview.4.1 59 12/13/2025
8.3.0-preview.3.1 57 12/14/2025
8.3.0-preview.2.1 57 12/14/2025
8.3.0-preview.1.8 58 12/14/2025
8.3.0-preview.0.132 53 12/14/2025
7.3.0.3 61 12/14/2025
7.3.0.3-preview.2.2 57 12/14/2025
7.3.0.3-preview.1.1 53 12/14/2025
7.3.0.2 57 12/14/2025
7.3.0.2-preview.1.1 58 12/14/2025
7.3.0.1 55 12/13/2025
7.3.0 59 12/14/2025
7.3.0-preview.1.2 60 12/14/2025
2.8.2.5 50 12/14/2025
2.8.2.4 16 10/02/2026
2.8.2.4-preview.96 61 12/14/2025
2.8.2.4-preview.95 55 12/14/2025
2.8.2.4-preview.89 62 12/13/2025
2.8.2.4-preview.84 51 12/14/2025
2.8.2.4-preview.82 53 12/14/2025
2.8.2.4-preview.76 52 12/14/2025
2.8.2.4-preview.70 59 12/14/2025
2.8.2.3 68 12/14/2025
2.8.2.2 59 12/14/2025
2.8.2.2-preview.8 58 12/14/2025
2.8.2.1 60 12/14/2025
2.8.2.1-preview.108 49 12/14/2025
2.8.2.1-preview.104 58 12/14/2025
2.8.2.1-preview.91 64 12/14/2025
2.8.2.1-preview.79 64 12/14/2025
2.8.2.1-preview.75 57 12/14/2025
2.8.2.1-preview.71 59 12/14/2025
2.8.2.1-preview.63 53 12/14/2025
2.8.2.1-preview.1 49 12/14/2025
2.8.2 52 12/14/2025
2.8.2-preview.266 67 12/14/2025
2.8.2-preview.256 56 12/14/2025
2.8.2-preview.254 53 12/14/2025
2.8.2-preview.232 53 12/14/2025
2.8.2-preview.209 54 12/14/2025
2.8.2-preview.187 66 12/14/2025
2.8.2-preview.179 68 12/14/2025
2.8.2-preview.178 57 12/14/2025
2.8.2-preview.155 56 12/14/2025
2.8.2-preview.152 74 12/14/2025
2.8.2-preview.150 60 12/14/2025
2.8.2-preview.145 52 12/13/2025
2.8.2-preview.140 72 12/14/2025
2.8.2-preview.139 70 12/14/2025
2.8.2-preview.127 88 12/14/2025
2.6.1.9 80 12/14/2025
2.6.1.9-preview.120 70 12/14/2025
2.6.1.9-preview.9 60 12/20/2025
2.6.1.9-preview.6 74 12/14/2025
2.6.1.9-preview.5 68 12/20/2025
2.6.1.9-preview.2 75 12/20/2025
2.6.1.8 57 12/14/2025
2.6.1.8-preview.93 68 12/20/2025
2.6.1.8-preview.90 58 12/20/2025
2.6.1.8-preview.61 50 12/16/2025
2.6.1.7 65 12/14/2025
2.6.1.7-preview.40 50 12/20/2025
2.6.1.7-preview.36 67 12/20/2025
2.6.1.7-preview.33 88 12/13/2025
2.6.1.7-preview.24 69 12/13/2025
2.6.1.7-preview.18 41 12/14/2025
2.6.1.6 49 12/14/2025
2.6.1.6-preview.19 77 12/20/2025
2.6.1.6-preview.18 61 12/17/2025
2.6.1.6-preview.9 68 12/20/2025
2.6.1.5 59 12/14/2025
2.6.1.5-preview.33 76 12/20/2025
2.6.1.5-preview.24 81 12/20/2025
2.6.1.5-preview.14 73 12/14/2025
2.6.1.5-preview.12 75 12/15/2025
2.6.1.5-preview.3 15 10/03/2026
2.6.1.4 60 12/14/2025
2.6.1.4-preview.2 75 12/20/2025
2.6.1.3 56 12/14/2025
2.6.1.2 71 01/01/2026
2.6.1.1 62 12/14/2025
2.6.1.1-preview.60 74 12/12/2025
2.6.1.1-preview.50 95 12/14/2025
2.6.1.1-preview.45 60 12/18/2025
2.6.1.1-preview.43 64 12/20/2025
2.6.1.1-preview.39 68 12/14/2025
2.6.1.1-preview.29 64 12/20/2025
2.6.1.1-preview.21 74 12/20/2025
2.6.1.1-preview.17 48 12/14/2025
2.6.1.1-preview.9 21 09/29/2026
2.6.1 69 12/13/2025
2.6.1-rc.172 59 12/14/2025
2.6.1-rc.170 54 12/11/2025
2.6.1-rc.169 58 01/01/2026
2.6.1-rc.165 75 01/01/2026
2.6.1-rc.153 67 12/17/2025
2.5.3-rc.147 62 12/14/2025
1.4.6.2 60 12/14/2025
1.4.6.2-preview28 65 12/14/2025
1.4.6.1 65 12/12/2025
1.4.6 55 12/14/2025
1.4.5 61 12/14/2025