Enum KashidaLevel
How far Kashida lengthens a word, as Word's three kashida justifications.
public enum KashidaLevel
Fields
High = 2Up to four tatweels per word (Word's
highKashida).Low = 0Up to one tatweel per word (Word's
lowKashida).Medium = 1Up to two tatweels per word (Word's
mediumKashida).
Examples
// Justified Arabic lengthens words with tatweels (kashida) before it widens spaces, as Word does.
ParagraphStyle style = new()
{
DefaultStyle = new TextStyle { FontFamilies = [arabic], Size = 16 },
Align = TextAlign.Justify,
Justify = TextJustify.Kashida,
Kashida = KashidaLevel.Medium, // up to two tatweels a word; Low one, High four
};
TextLayout layout = Paragraph.Create(text, style).Layout(260);
canvas.DrawTextLayout(layout, new System.Numerics.Vector2(20, 10));