![]() |
VOOZH | about |
dotnet add package Aspose.Words.Shaping.HarfBuzz --version 26.6.0
NuGet\Install-Package Aspose.Words.Shaping.HarfBuzz -Version 26.6.0
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="26.6.0" />
<PackageVersion Include="Aspose.Words.Shaping.HarfBuzz" Version="26.6.0" />Directory.Packages.props
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" />Project file
paket add Aspose.Words.Shaping.HarfBuzz --version 26.6.0
#r "nuget: Aspose.Words.Shaping.HarfBuzz, 26.6.0"
#:package Aspose.Words.Shaping.HarfBuzz@26.6.0
#addin nuget:?package=Aspose.Words.Shaping.HarfBuzz&version=26.6.0Install as a Cake Addin
#tool nuget:?package=Aspose.Words.Shaping.HarfBuzz&version=26.6.0Install as a Cake Tool
Aspose.Words.Shaping.Harfbuzz is an add-on for Aspose.Words for .NET, a widely used document processing library. It utilizes the HarfBuzz text shaping engine to improve the rendering of OpenType fonts within documents.
Text shaping is crucial for properly displaying languages that require intricate glyph positioning and substitution, such as Arabic, Thai, Hebrew and others. By integrating HarfBuzz, Aspose.Words.Shaping.Harfbuzz allows Aspose.Words for .NET to provide more accurate text rendering and better support for OpenType fonts, ensuring that documents are displayed correctly across different platforms.
Please note: Aspose.Words.Shaping.Harfbuzz uses P/Invoke technology for invoking unmanaged functions from HarfBuzz.
Shaping is an essential process getting text ready for display. Before rendering a Unicode sequence, the code points must be mapped to the corresponding glyphs from the font, and these glyphs need to be correctly positioned relative to each other.
As mentioned above, shaping is critical for displaying languages that require intricate glyph positioning and substitution. But for other languages based on the Latin or Cyrillic scripts, shaping is also necessary.
For correct display of fonts, shaping implements the following features:
kerning – changing the spacing between glyphs depending on their shape
ligatures (standard, contextual, historical, discretionary)
number spacing (proportional, tabular)
stylistic sets – feature that allows you to apply alternative designs or styles to specific characters or groups of characters within a font
Text shaping is a non-trivial task, so Aspose.Words currently offers users to choose the third-party library that best suits their needs when implementing shaping. Aspose.Words provides the ITextShaper and ITextShaperFactory interfaces and expects that a third-party library implements them.
To enable shaping in Aspose.Words, it is needed to initialize the Document.LayoutOptions.TextShaperFactory property with an instance of a class that implements the ITextShaperFactory interface.
Aspose.Words.Shaping.Harfbuzz implements the ITextShaper interface, using the harfbuzz.dll library underhood. In fact, Aspose.Words.Shaping.Harfbuzz is just an adapter that allows to use the harfbuzz.dll text shaping library in Aspose.Words.
The package provides class HarfBuzzTextShaperFactory which implements ITextShaperFactory and also BasicTextShaperCache which just wraps up HarfBuzzTextShaperFactory and supports caching and reusing of the loaded font files.
Aspose.Words.Shaping.Harfbuzz exposes a static property Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance which is an instance of the shaper factory supporting caching. Actually, to use Aspose.Words.Shaping.HarfBuzz you just need to initialize the Document.LayoutOptions.TextShaperFactory property with this static field:
Document.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
Would you like to give it a try? Let us guide you through the process in just a few simple steps. For Windows platforms, no additional efforts are required to install HarfBuzz, as Aspose.Words.Shaping.Harfbuzz already includes the compiled HarfBuzz library.
For other systems, Aspose.Words.Shaping.Harfbuzz relies on the already installed HarfBuzz library. For instance, on many Linux-based systems, HarfBuzz is installed system-wide by default. If not, there is usually a package available for installation through the package manager.
You can run the following code snippets in C# to see how our library works. Also feel free to check out the GitHub Repository for other common use cases.
// Load a Word file from the local drive.
Document doc = new Document("InputWordDocument.docx");
// Initialize TextShaper factory with predefined instance.
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
// Save it to PDF format.
doc.Save("OutputPdfDocument.pdf");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net6.0-windows7.0 net6.0-windows7.0 is compatible. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net8.0-windows7.0 net8.0-windows7.0 is compatible. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net35 net35 is compatible. net40 net40 is compatible. net403 net403 was computed. net45 net45 was computed. net451 net451 was computed. net452 net452 was computed. net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
Showing the top 1 popular GitHub repositories that depend on Aspose.Words.Shaping.HarfBuzz:
| Repository | Stars |
|---|---|
|
aspose-words/Aspose.Words-for-.NET
Aspose.Words for .NET examples, plugins and showcases
|
| Version | Downloads | Last Updated |
|---|---|---|
| 26.6.0 | 399 | 6/4/2026 |
| 26.5.0 | 801 | 5/7/2026 |
| 26.4.0 | 1,423 | 4/6/2026 |
| 26.3.0 | 18,942 | 3/9/2026 |
| 26.2.0 | 1,433 | 2/10/2026 |
| 26.1.0 | 913 | 1/13/2026 |
| 25.12.0 | 2,142 | 12/4/2025 |
| 25.11.0 | 8,166 | 11/11/2025 |
| 25.10.0 | 30,032 | 10/7/2025 |
| 25.9.0 | 3,994 | 9/5/2025 |
| 25.8.0 | 59,322 | 8/6/2025 |
| 25.7.0 | 1,074 | 7/7/2025 |
| 25.6.0 | 4,250 | 6/6/2025 |
| 25.5.0 | 1,373 | 5/7/2025 |
| 25.4.0 | 1,184 | 4/7/2025 |
| 25.3.0 | 1,248 | 3/7/2025 |
| 25.2.0 | 10,533 | 2/7/2025 |
| 25.1.0 | 12,787 | 1/7/2025 |
| 24.12.0 | 6,624 | 12/9/2024 |
| 24.11.1 | 1,078 | 11/15/2024 |