LayoutOptionsTextShaperFactory Property

Gets or sets ITextShaperFactory implementation used for Advanced Typography rendering features.

Namespace:  Aspose.Words.Layout
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public ITextShaperFactory TextShaperFactory { get; set; }

Property Value

Type: ITextShaperFactory
Examples
Shows how to support OpenType features using HarfBuzz text shaping engine.
// Open a document
Document doc = new Document(MyDir + "OpenType text shaping.docx");

// Please note that text shaping is only performed when exporting to PDF or XPS formats now

// Aspose.Words is capable of using text shaper objects provided externally
// A text shaper represents a font and computes shaping information for a text
// A document typically refers to multiple fonts thus a text shaper factory is necessary
// When text shaper factory is set, layout starts to use OpenType features
// An Instance property returns static BasicTextShaperCache object wrapping HarfBuzzTextShaperFactory
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;

// Render the document to PDF format
doc.Save(ArtifactsDir + "Document.OpenType.pdf");
See Also