Persian calligraphy / A visual introduction

Nastaʿlīq

Imagine cursive whose letters don't have to sit on one straight line. In this calligraphic style, developed in Iran in the 14th century, connected letter groups descend from right to left, curve and stretch, while neighboring groups may stack above one another.

نستعلیق

Writing beyond the baseline

Latin · left to right
Hello world

Most letters sit on a shared baseline.

Naskh · right to left
سلام دنیا

Connected Persian text, relatively level.

Nastaʿlīq · same text
سلام دنیا

Groups hang diagonally; curves reach below or above the guide.

Level groups →← Descending groups (schematic)

Nastaʿlīq changes the visual arrangement, not the underlying alphabet. Shekasteh (literally “broken”) is a more cursive, condensed related style. The dashed lines are illustrative, not calligraphic rules.

Look closely

Notice the long sweeping strokes, sloping words and layers of letters. Select an image to enlarge it, or skip to the technical comparison.

Persian and Urdu: what actually differs?

Both languages use the Arabic-derived Perso-Arabic script, but their alphabets and orthographic conventions are not identical. Nastaʿlīq is a shared calligraphic style: widely used for Urdu reading and publishing, and prominent in Persian calligraphy. Persian digital body text often uses more level typefaces.

Script & alphabet

Shared script (Arab), different language-specific character inventories. Persian has 32 conventional letters; Urdu has a larger inventory (counts vary by treatment of digraphs and signs).

Keyboard layout

The same physical keyboard can use either input layout. Persian Standard and Urdu map keys to characters differently; Urdu also needs its additional letters. Persian layout · Urdu layout.

Unicode

Both use the same Unicode standard, including the Arabic block. A character is stored in logical order, independently of its eventual shape. Some corresponding letters use different code points.

Character inventory

Shared examples
پU+067E
چU+0686
ژU+0698
گU+06AF
کU+06A9
یU+06CC
Used in Urdu, not normally in Persian
ٹU+0679
ڈU+0688
ڑU+0691
ںU+06BA
ھU+06BE
ےU+06D2

Retroflex consonants, vowel nasalization, aspiration and a yeh variant.

Corresponding heh letters, different encoding
هU+0647Persian
ہU+06C1Urdu

These are distinct Unicode characters, not just alternate fonts for one character.

Style, typeface and font

Style: Nastaʿlīq (a tradition of arranging and shaping letters). Typeface: a particular visual design, such as IranNastaliq or Noto Nastaliq Urdu. Font: the digital resource implementing that design, such as a TTF or WOFF2 file, containing glyphs and layout rules.

IranNastaliq · Persian-oriented typeface
سلام دوست

Loading Persian typeface…

Noto Nastaliq Urdu · Urdu-oriented typeface
سلام دوست

Same characters and language tag; a different font.

Persian example
این کتاب زیباست

This book is beautiful.

Urdu example
یہ کتاب خوبصورت ہے

Same meaning, different language and spelling.

From keystrokes to glyphs

An input layout produces Unicode code points in logical order. The layout engine resolves bidirectional runs (UAX #9); the shaping engine (e.g. HarfBuzz) uses font mappings (cmap), contextual substitution (GSUB) and positioning (GPOS). In Nastaʿlīq, cursive attachments can shift glyphs vertically as well as horizontally, producing the descending groups. A language tag can select language-specific substitutions when supported by a font. Changing only the font does not change the stored text; changing the input characters can.

1 · InputKeyboard / IMEPersian or Urdu layout
2 · Logical textUnicode code points0633 0644 0627 0645سلام
3 · Layout & shapingBidi · script/lang · cmapGSUB → GPOSGlyph IDs + x/y advances and offsets
4 · RenderingPositioned glyph outlinesسلامسلام

The two outputs are Naskh and Nastaʿlīq renderings of the same four characters. For OCR, visual glyph groups, overlapping extents and line segmentation add complexity; for NLP, character normalization concerns the underlying code points rather than the typeface.

References: Unicode: Arabic script · W3C Urdu layout · Urdu orthography notes · Windows input layouts · OpenType Arabic shaping · IranNastaliq (OFL) · Noto Nastaliq Urdu

Why typography matters for language technology

In a 2023 TIME article, Anmol Irfan describes how inadequate Urdu keyboards and typography encouraged some users to adopt Roman Urdu, while OCR limitations left scanned literature difficult to search. The article also highlights Matnsaz, the Makhzan Urdu corpus, and the Naqqash Arabic-script string-processing library.

Computational takeaway: input and rendering barriers can influence which texts become available as machine-readable corpora. Roman Urdu introduces spelling variation; scanned literature requires OCR before it can support search or NLP. Unicode support alone does not solve these problems.

Anmol Irfan (2023). The Fight to Preserve the Urdu Script in the Digital World. TIME, September 27. · Matnsaz

Interactive experiment: typing into a form

A Unicode-enabled text field can accept Persian and Urdu in the same field. The selected keyboard layout determines which characters enter the string. The application may separately choose a language, a font, direction, spellchecker or validation rules. None of those is automatically encoded into every letter.

Try it · one text field, independent display settings
Stored logical Unicode sequence

Requested CSS font-family

Why Urdu can look different by default: an operating system, browser, application or website can choose a language-appropriate font; an Urdu keyboard may be associated with an Urdu locale. The language tag (lang="ur") may affect font selection and language-sensitive shaping, but does not force Nastaʿlīq. The actual outline shapes come from the selected font. If it is unavailable or lacks the required glyphs, the renderer tries other fonts, which may have a completely different typeface or style. If no suitable font exists, a missing-glyph symbol may appear. The stored text is unchanged.

A form can still impose language-specific validation (for example, rejecting Urdu letters in a Persian-only field), even if its Unicode encoding supports both. Copying plain text usually preserves the character sequence, not the font choice; rich text may preserve separate formatting metadata.

Reference: CSS font matching and fallback · Unicode Arabic script FAQ.