5 MIN READ

Why Nastaliq text breaks in most apps

Urdu looks wrong in most apps because no Nastaliq font was ever loaded, so the text falls back to whatever Arabic-script face the operating system happens to ship.

That fallback is almost always naskh: flat, upright, level-baselined. The letters are correct and the script is not.

In short

  • Nastaliq rarely breaks because of a bug. It breaks because nobody shipped the font.
  • Missing language and direction attributes make it worse, since the engine is then guessing.
  • This website had the bug when the article was written, so the fix is documented here from the inside.

Why does Urdu render flat instead of sloping?

Because a font stack that ends in a generic family hands Urdu to the system default, and system defaults for the Arabic script are naskh, not Nastaliq.

Declaring font-family: 'Sora', sans-serif tells the browser to use Sora, which has no Urdu glyphs, then fall back to the generic sans-serif. What satisfies that generic for Arabic-script characters is whatever the platform ships: Noto Sans Arabic, Geeza Pro or similar, all naskh. Nothing in the stack asked for Nastaliq, so nothing supplies it.

The text is not corrupted and the letters are not wrong. It is the same alphabet in the wrong hand, which is why this ships unnoticed by anyone who cannot read the script.

What did the bug look like on this site?

You could read it in the font stack. This site loaded five families through Google Fonts, all Latin: Archivo, Source Serif 4, Sora, Libre Franklin and Hanken Grotesk. There was no Nastaliq face anywhere in the repository and no @font-face rule pointing at one.

So when an article here printed عام and آم inline, those characters were rendered by the reader's operating system in whatever it preferred, which on most machines is naskh. An article explaining that Urdu is written in a sloping script displayed its own examples in a flat one.

The hand-written app profile page did better in one respect: it marked its Urdu verse lang="ur" dir="rtl", so the engine at least knew the language and direction. The generated article pages carried neither, because the Markdown pipeline passed Urdu straight through as bare text with no lang and no dir on it at all.

Why do language and direction attributes matter?

Because without them the rendering engine has to infer things it could have been told, and inference fails at the edges.

Direction is the visible one. The Unicode bidirectional algorithm infers right-to-left runs from the characters themselves, which handles a clean Urdu sentence well and mixed content badly. Put Urdu beside a comma or a bracket, as our examples do, and that neutral character's side is decided by context rather than intent. That is how a full stop ends up on the wrong end.

Language is the quieter one. lang="ur" lets the engine pick language-appropriate glyph forms and lets font matching prefer an Urdu face where several are available. Omit it and you have given up a hint that costs one attribute.

Why do developers skip the font?

Not laziness. Nastaliq webfonts are genuinely expensive to ship, because the script is built out of ligatures rather than letters placed in a row.

A digital Nastaliq needs a large ligature table; the first, Noori Nastaliq in 1981, required more than 20,000. Modern OpenType is cleverer, but the files stay heavier than a Latin face. On a page already loading five Latin families, adding one is a noticeable cost for text that may be two words long.

A defensible trade, and also how the situation persists: every decision to skip it is reasonable, and the aggregate is that Urdu readers spend their lives looking at their language set wrong.

What does fixing it take?

Three things, and writing this article is what finally got them done.

Load a real Nastaliq face: Noto Nastaliq Urdu comes from Google Fonts unicode-range-subsetted, so pages with no Urdu download none of it, which removes the usual objection to shipping it. Scope it to Urdu rather than applying it globally. Then mark every Urdu run lang="ur" dir="rtl", which for generated pages means the build doing it, wrapping each Arabic-script run whole so the spaces inside a phrase do not fall back into the surrounding left-to-right context and reorder it.

Urdu Bible never had the problem, because the app bundles its own typesetting instead of inheriting a website's font stack.

FAQ

Why does Urdu look different in different apps?

Because each app resolves its own font stack. If an app loads a Nastaliq face you see sloping calligraphic text; if it falls back to the system default you see flat naskh. The characters are identical either way, so the text is readable but visually wrong.

Is naskh wrong for Urdu?

It is not incorrect, since it uses the same alphabet, but it is not what Urdu readers expect. Urdu has been set in Nastaliq for ordinary text longer than any other language, so naskh reads as foreign.

Does adding lang and dir attributes fix Nastaliq rendering?

They fix direction and glyph-selection problems, especially around punctuation in mixed text, but cannot supply a font that was never loaded. You need both.


If you want to see Urdu set the way it is supposed to be, Urdu Bible typesets all 66 books in Nastaliq with a Roman line beneath. Free, offline, no ads.

More from Dusk

5 MIN READJUL 29

Bible app vs printed Bible: what changes

A Bible app and a printed Bible hold the same text in different objects. What changes in weight, search, text size and battery, and what does not.

4 MIN READJUL 29

How to find a verse when you forget the reference

You remember the words but not the chapter. How full-text search finds a verse from a fragment, which words to search for, and which ones waste your time.

4 MIN READJUL 29

Is there a free Urdu Bible app with no ads?

Yes. Urdu Bible is free, carries no advertising and asks for no account. Here is what free actually costs to run, and why we chose it anyway.

5 MIN READJUL 29

How to read the Bible in Urdu without the script

You can read the Bible in Urdu without knowing Nastaliq by using a Roman Urdu edition: the same Urdu words, spelled in the Latin letters you already read.

5 MIN READJUL 29

How to read the Bible at night without eye strain

Night mode gets the credit, but text size does most of the work. What actually reduces eye strain when reading scripture in bed, for tired and older eyes.

5 MIN READJUL 29

Why can't I read Urdu even though I speak it?

Speaking a language and reading it are learned in different places. Why fluent Urdu speakers never picked up the script, and why that is completely ordinary.

4 MIN READJUL 29

Transliteration vs translation: the difference

Transliteration changes the alphabet and keeps the words. Translation changes the words to carry the meaning. Why the difference matters for scripture.

5 MIN READJUL 29

Why Urdu Bible collects no data at all

Urdu Bible declares no data collected and no data shared on its store listing. What that declaration means, how to check it, and what it costs us.

4 MIN READJUL 29

Urdu Bible vs Zaboor: which one do you need?

Urdu Bible holds all 66 books of scripture. Zaboor holds Psalms, hymns and prayers to sing. What each app contains, and which one you actually want.

5 MIN READJUL 29

What is a reading Bible edition?

A reading Bible is defined by what it leaves out: no verse numbers, no cross-references, no notes. Here is why publishers strip them, and what it costs.

5 MIN READJUL 29

What is an offline Bible app?

An offline Bible app ships the whole text inside the install, so reading fetches nothing and records nothing. How to tell if one really works offline.

5 MIN READJUL 29

What is Nastaliq, and why is Urdu written in it?

Nastaliq is the sloping calligraphic script Urdu is set in. Where it came from, how its letters behave, and why it took until 1981 to print properly.

5 MIN READJUL 29

What is Roman Urdu, and who reads it?

Roman Urdu is the Urdu language written in the Latin alphabet. Where it came from, why its spelling is never fixed, and who reads it instead of the script.

5 MIN READJUL 29

What we left out of Urdu Bible, and why

No commentaries, maps, footnotes, streaks or reading plans. What we left out of Urdu Bible, and the line we drew about what a software studio should do.

5 MIN READJUL 29

Why we build for Urdu-speaking Christians first

Because it is the audience we belong to and can check our own work against. The practical case for starting with a small group, and how it goes wrong.

5 MIN READJUL 29

Why we built Urdu Bible, a Bible in two scripts

A grandparent reads Nastaliq and a grandchild reads only Latin letters. One book leaves one of them out, so we built an Urdu Bible that leaves neither.

5 MIN READJUL 27

Why we built Zaboor, a digital Urdu hymnal

We built Zaboor because a congregation loses the first verse of every hymn to a page hunt. Here's the story, the two decisions behind it, and what happened.

4 MIN READJUL 25

PDF menu vs 3D menu: which should your QR code open?

PDF menu vs 3D menu: both open from a QR code, but only one shows guests the dish. What changes for guests, for staff, and every time you edit a price.

4 MIN READJUL 14

3-day vs 6-day Push Pull Legs: which should you run?

3-day vs 6-day Push Pull Legs: the 6-day trains each muscle twice a week, which research favours, but only if you attend. Here's how to choose honestly.

4 MIN READJUL 14

How to keep a brag document for review season

How to keep a brag document for review season: one running note, a five-minute Friday habit, and your self-review assembles itself in an afternoon.

3 MIN READJUL 14

How to break a bench press plateau

Break a bench press plateau by checking the log first: most stalls are missed sessions or low volume. Then change one variable and hold it a month.

4 MIN READJUL 14

How to start tracking workouts in 5 minutes

Start tracking workouts in five minutes: log exercise, weight and reps for every work set, then beat one number next session. The whole setup is here.

3 MIN READJUL 14

Push Pull Legs vs Upper Lower: how to choose

Push Pull Legs vs Upper Lower: both build muscle, so choose by how many days you can really train. Here's the research and a ten-second decision rule.

4 MIN READJUL 14

How to start a wins journal in five minutes

Start a wins journal in five minutes: pick one place, write one line about one recent win, and stop. Here's the setup and the rule that keeps it alive.

4 MIN READJUL 14

What counts as a win worth writing down?

What counts as a win worth writing down? Anything that cost you something: effort, fear, or restraint. The size doesn't matter. Here's a simple test.

4 MIN READJUL 14

What is a brag document?

A brag document is a running record of your accomplishments at work, kept so review season doesn't depend on memory. Here's what goes in one and why.

4 MIN READJUL 14

What is a wins journal (and why keep one)?

A wins journal is a record of things that went right, kept so you can reread them later. Here's why it works, and what it does that memory can't.

4 MIN READJUL 14

What is progressive overload? A plain-English guide

Progressive overload means gradually asking your muscles to do more over time. Here's what it means in plain English and how to apply it in the gym.

4 MIN READJUL 14

What is the cookie jar method?

The cookie jar method is a mental technique: collect your past wins and deliberately revisit them when things get hard. Here's how to build yours.

4 MIN READJUL 14

What is training volume, and why do lifters track it?

Training volume is the total work you do in the gym, usually counted as hard sets per muscle each week. Here's why lifters track it and how to start.

4 MIN READJUL 14

Why we built Cookie Jar, a jar for your wins

We built Cookie Jar because every journal we tried demanded streaks and reflection, and we wanted somewhere to keep the good days. Here's the story.

3 MIN READJUL 14

Why you forget your wins (and how to fix it)

You forget your wins because the brain weighs bad events more than good ones, a bias research has measured. The fix: write them down, reread them.

4 MIN READJUL 14

Wins journal app vs notes app: an honest comparison

Wins journal app vs notes app: writing wins down works anywhere, but the point is getting them back on a bad day. Here's an honest comparison.

3 MIN READJUL 14

Wins journal vs gratitude journal: the difference

Wins journal vs gratitude journal: one records what you did, the other what you're thankful for. Here's the real difference and how to choose yours.

3 MIN READJUL 14

Workout app vs notes app: what actually matters

Workout app vs notes app for lifting: what matters is seeing last session's numbers while you train. Here's when notes work, and when they stop.

4 MIN READJUN 1

How a 3D menu changes the way people order

A 3D restaurant menu lets guests see each dish before they order. Across twelve venues, mis-orders fell 31% once people could see what was coming.