Table of Contents

Enum KashidaLevel

Namespace
Egami.Fonts.Layout
Assembly
Egami.Fonts.dll

How far Kashida lengthens a word, as Word's three kashida justifications.

public enum KashidaLevel

Fields

High = 2

Up to four tatweels per word (Word's highKashida).

Low = 0

Up to one tatweel per word (Word's lowKashida).

Medium = 1

Up 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));