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: 21.9.0

ExpandedSyntax

public ITextShaperFactory TextShaperFactory { get; set; }

Property Value

Type: ITextShaperFactory

ExpandedExamples

Shows how to support OpenType features using the HarfBuzz text shaping engine.
Document doc = new Document(MyDir + "OpenType text shaping.docx");

// Aspose.Words can use externally provided text shaper objects,
// which represent fonts and compute shaping information for text.
// A text shaper factory is necessary for documents that use multiple fonts.
// When the text shaper factory set, the layout uses OpenType features.
// An Instance property returns a static BasicTextShaperCache object wrapping HarfBuzzTextShaperFactory.
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;

// Currently, text shaping is performing when exporting to PDF or XPS formats.
doc.Save(ArtifactsDir + "Document.OpenType.pdf");

ExpandedSee Also