← ClaudeAtlas

urdu-arabic-web-textlisted

Proven recipe for showing Urdu (Nastaliq) and Arabic (Qur'anic, Naskh) text on websites and web apps so it renders correctly and reads comfortably on every device: font choice per script (Jameel Noori Nastaleeq, Noto Nastaliq Urdu, DigitalKhatt IndoPak, Amiri Quran), the Safari/iPhone traps (Nastaliq unjoined in CoreText, Qur'anic marks dropped), right spacing (word-spacing not letter-spacing, line-height for tall Nastaliq), RTL markup, correct Qur'anic text (shadda + khara alif on Allah, madd sign), font subsetting verified with HarfBuzz, and drawing a fixed phrase such as the Bismillah as an SVG. Use whenever a page shows Urdu, Arabic, Persian or Qur'anic text, an Islamic or mosque site needs Bismillah, prayer names, ayat or hadith, or the user says RTL text looks cramped, cut off, broken, unjoined, has missing dots or vowel marks, or wrong spacing, even if they don't name fonts.
saad-git-007/claude-skills · ★ 1 · Web & Frontend · score 74
Install: claude install-skill saad-git-007/claude-skills
# Urdu and Arabic text on the web Distilled from a production mosque website (Cloudflare Worker, plain HTML/CSS, no framework) whose public pages show the Bismillah, Arabic prayer names, Qur'anic verses and long Urdu passages from the Promised Messiah (as) and the Khulafa, in light and dark themes, on phones and desktops. Every rule below fixed a bug the owner actually saw. The main lesson: **the font, the text and the browser all have to agree, and Safari is the one that disagrees.** Test there, or hand off a fixed rendering (SVG) when the text never changes. ## The rules (why each exists) 1. **One font per job, by script.** Urdu in Nastaliq (Jameel Noori Nastaleeq; Noto Nastaliq Urdu on Apple), Qur'anic Arabic in a Qur'anic font (DigitalKhatt IndoPak for the Indo-Pak style South Asian readers expect; Amiri Quran as a fallback). Never set Qur'an in a Nastaliq font or Urdu in a Naskh font: readers notice immediately. 2. **Space words, never letters.** `letter-spacing` breaks the joins of connected scripts. Widen gaps with `word-spacing` (`.3em` ≈ one narrow letter was what the owner asked for). Don't `text-transform` or justify-stretch them. 3. **Nastaliq is tall.** It slopes down to the right and stacks dots; give it `line-height: 2.25`–`2.4` and padding inside its box, or the dots of one line touch the next and the first line's top gets clipped. Qur'anic Arabic with full vowel marks needs ~`2.1`; short labels (prayer names) ~`1.8`. 4. **Bigger than the Lat