Devanagari Script
Devanagari carries Hindi, Marathi, Nepali, Sanskrit, and several other languages, and it's the script most people picture first when they think of Indic type. Its defining feature is the shirorekha, the horizontal bar that most letters hang from. This article covers its letters, its conjunct system, and what a font needs to render it correctly.
Devanagari, in one screen
An abugida descended from Brahmi, used across North and Central India and Nepal, built around a continuous headline and a dense, historically rich conjunct system.
Devanagari has 33 consonants and 11 independent vowels, each carrying its inherent "a" sound until a dependent vowel sign changes it. The vowel signs below are shown attached to a dotted circle, the standard convention for displaying a mark that can't stand on its own.
Most Devanagari letters share a horizontal stroke across their top, and when letters sit next to each other in a word, those strokes join into one continuous line: the shirorekha, literally "head-line." It's the single most recognizable feature of the script, and it changes how you think about spacing and rhythm. In Latin type, the eye tracks a baseline and a mix of ascenders and x-heights above it. In Devanagari, the eye tracks the shirorekha first, a strong, continuous horizontal band, with the letterforms hanging below it like a row of pendants.
Not every part of a word touches that line. र doesn't connect flush the way most consonants do, and below-base vowel signs, the kind that turn क into कु or कू, hang entirely beneath the baseline, with no headline stroke at all. That contrast is intentional: it keeps the shirorekha reading as one deliberate line rather than a solid bar with no internal structure. Getting its weight and continuity right, so it reads as one line rather than a series of disconnected caps, is one of the first things worth testing in a new Devanagari design.
Four horizontal bands do most of the work in a Devanagari design: the shirorekha at the top, the letter body beneath it, the baseline, and a below-baseline zone where several vowel signs and subjoined consonants sit.
Notice how the vowel sign in हि sits to the left, above the headline, while the vowel sign in दी extends to the right at headline height, and the conjunct न्द sits entirely within the body between the shirorekha and the baseline. This is the same visual logic covered in the series introduction, applied to real letterforms rather than abstract boxes.
The introduction article showed क plus vowel sign I shaping into कि, with the vowel sign moving to the left of its consonant. Devanagari has two other reordering patterns worth knowing before you draw a single glyph.
The vowel signs in को and कौ are each stored as a single Unicode character, but they're drawn as two pieces on either side of the consonant: a short vertical stroke before it and a length mark after it. Unicode calls this a split matra, and a font has to supply both halves as one coordinated glyph so they read as a single mark rather than two unrelated strokes.
When a consonant is followed by another consonant with no vowel between them, Devanagari doesn't fall back to a bare virama the way this article's earlier examples did. It ligates, and the shape of that ligature depends on which consonant is involved and where it falls in the cluster.
Half-forms are the default: a consonant followed by virama and another consonant typically drops its right-side vertical stroke and ligates directly onto what follows, as स् does in स्व. Reph is specific to Ra: when Ra opens a cluster and isn't the syllable's base, it contracts to a small hook above the base consonant instead of staying on the baseline, exactly what happens to र् in सूर्य ("sun"). Rakar, sometimes called vattu, is the mirror case: when Ra follows a consonant with no vowel between them, it drops below the base as a curved hook, as in क्रम ("order").
The series introduction covered the general Indic feature set. Devanagari leans on most of it, plus one feature specific to how its conjuncts work.
| Feature | Tag | What it builds here |
|---|---|---|
| Akhand ligatures | akhn | Forms क्ष, ज्ञ, and त्र before any other conjunct rule applies. |
| Reph formation | rphf | Turns a leading Ra + virama into the above-base reph hook. |
| Half forms | half | Builds the reduced pre-base form most consonants take before a conjunct partner. |
| Below-base forms | blwf | Builds rakar and the handful of other consonants with a below-base shape. |
| Post-base forms | pstf | Rare in Devanagari, used for a small set of post-base conjunct shapes. |
| Localized forms | locl | Swaps in Marathi-specific eyelash-ra and other language variants. |
| Mark positioning | mark / mkmk | Anchors matras, anusvara, and visarga, and stacks marks on marks for Sanskrit vedic signs. |
Applied in order, these features analyze the syllable, pull out reph and any half-forms, resolve the remaining conjunct, then position matras and marks around the result. The reph and split-matra examples above are the direct output of that pipeline, not something a font hand-places character by character.
| Symptom | Likely cause | Fix |
|---|---|---|
| Reph appears on the wrong consonant | Half-form classification is missing for a consonant in the cluster | Check every consonant's half lookup, since reph placement depends on it |
| Half-forms don't trigger | Font lacks half glyphs or the feature isn't wired for the script | Verify half-form glyphs exist and are reachable through the half feature |
| क्ष, ज्ञ, or त्र render as separate letters | Missing or misconfigured akhn lookup | Add explicit akhand ligature substitutions, applied before other conjunct rules |
| Matra collides with the shirorekha or an ascender | No contextual adjustment for tall base glyphs | Add GPOS adjustments or alternate matra forms for tall bases |
| Rakar lands in the wrong spot | Below-base anchor missing or mispositioned on the base glyph | Audit anchor points across the full consonant set, not just common ones |
- 1Draw a consistent shirorekha across the full consonant and vowel set, and check it reads as one line at text sizes.
- 2Build half-forms for all 33 consonants, not just the common ones, and verify each ligates cleanly.
- 3Implement reph and rakar, and test both against consonants with ascenders and descenders.
- 4Build the three akhand ligatures (क्ष, ज्ञ, त्र) as dedicated glyphs, not assembled from parts.
- 5Position every matra, including split matras like the ones in को and कौ, against every consonant shape, including half-forms.
- 6Test across shaping engines and at multiple sizes and weights before calling the script done.
Copy these into a test document. Each targets a different part of the shaping pipeline covered above.