Table of Contents

Method CanShape

Namespace
DocWright.Fonts
Assembly
DocWright.Fonts.dll

CanShape(FontFace, string?)

Shapes Arabic and Hebrew through the face's own GSUB and GPOS tables - joining forms, required and standard ligatures, contextual alternates, marks and kerning - when the face has the tables, covers the script and maps the run's letters. Every other script, and every face that fails one of those tests, keeps the cmap + hmtx path byte for byte; a run the tables cannot shape (a malformed table, an exhausted work budget) falls back to it too, so shaping never turns into an exception.

public static bool CanShape(FontFace face, string? scriptTag)

Parameters

face FontFace

The resolved face.

scriptTag string

The OpenType script tag of the run (arab, hebr, ...), or null.

Returns

bool

True when Arabic or Hebrew text in this face gets joining forms, ligatures and marks.