Skip to content
 
 

Repository files navigation

Urdu for Web - Community Edition

A community-maintained fork of WebUrdu / Urdu for Web by Fahad Yousaf Mahar.

The extension renders Urdu text on websites with a bundled Nastaliq/Naskh font, and now lets you choose which font to use from five bundled faces plus your locally installed Jameel Noori Nastaleeq.

This fork github.com/ishaqx/WebUrdu
Original project github.com/FahadYousafMahar/WebUrdu
Firefox Manifest V2 WebExtension (Firefox desktop)
Extension ID {3400be22-747d-4e98-81bc-cdfa0328d114}

What it does

Websites with Urdu content — pages tagged lang="ur" or dir="rtl" (BBC Urdu, DW, TRT, Independent Urdu, Arab News, NHK World, Al Arabiya, Google, Facebook, WhatsApp Web, X/Twitter and most other pages), plus untagged Urdu text in YouTube comments/live chat, ChatGPT conversations, Google Gemini, SBS Urdu and the CGTN Urdu homepage — have their Urdu text rendered in a bundled high-quality font instead of the system fallback. The bundled font is served from inside the extension, so the extension works fully offline.

This fork changes:

  1. Fixes the bundled-font loading bug in Firefox (the font is now loaded with extension-relative URLs; no local() lookup and no page-root-absolute URL are used).
  2. Packages five bundled fonts instead of one (Mehr, Awami Nastaliq, Gulzar, Noto Nastaliq Urdu, Noto Naskh Arabic) plus an option for a locally installed Jameel Noori Nastaleeq.
  3. Adds a Font selector in the extension popup (Urdu Notepad).
  4. Persists your font choice with browser.storage.local and applies it live to already-open pages and the Notepad.
  5. Uses a new Gecko extension ID, so it installs side by side with the original WebUrdu extension.
  6. Extends site coverage to x.com, YouTube comments, ChatGPT, Gemini, Facebook posts/comments, SBS Urdu, Al Arabiya Urdu and CGTN Urdu.

Supported fonts

Font Bundled Default Script
Mehr Nastaliq Web yes yes Nastaliq (Urdu)
Awami Nastaliq yes no Nastaliq (Urdu)
Gulzar yes no Nastaliq (Urdu)
Noto Nastaliq Urdu yes no Nastaliq (Urdu)
Noto Naskh Arabic yes no Naskh (Arabic)
Jameel Noori Nastaleeq no (uses your installed copy) no Nastaliq (Urdu)

The default is Mehr Nastaliq Web, matching the original extension's behaviour.

Jameel Noori Nastaleeq is not shipped with the extension because it is proprietary freeware (free for personal/non-commercial use only) and cannot be redistributed in an extension package. Selecting it in the popup uses the copy installed on your own system; if it is not installed, Urdu text automatically falls back to Mehr Nastaliq Web.

How to install

The extension is packaged for Firefox (Manifest V2). To install from source:

web-ext lint
web-ext build

Then open about:debugging#/runtime/this-firefox, click Load Temporary Add-on… and pick the generated XPI (or manifest.json).

Alternatively submit the built XPI to Mozilla Add-ons for signing as a self-distributed (unlisted) extension.

How to select a font

  1. Click the Urdu for Web toolbar icon to open the Urdu Notepad.
  2. Pick a font from the Font drop-down in the toolbar.
  3. The Notepad and every already-open Urdu page switch immediately; new pages keep the stored selection.

Browser support

Target browser is Firefox (desktop). The extension uses Manifest V2 and the browser.* extension APIs. Compatibility with other browsers is not guaranteed; the original project also targeted Chrome/Opera-era builds, but this fork is developed and tested against Firefox only.

Known limitations

  • SBS Urdu (/language/urdu/*), Al Arabiya Urdu, CGTN Urdu and Facebook keep lang/dir off their Urdu text (or declare a different root language), so their stylesheets apply the selected font to text containers directly. English text in those containers then renders with the system Latin face of the Urdu families (Arial/Calibri) instead of the site's own UI font.
  • Facebook post/comment selectors (div[role="article"] [dir="auto"]) and the Gemini selectors target frequently-changing markup and may need periodic updates (verify during browser testing).
  • ChatGPT code blocks keep their own monospace font.
  • The Twitter/X stylesheet only carries the classic twitter.com legacy selectors; modern x.com posts are covered by the generic rules.
  • WhatsApp Web styles only apply when the WhatsApp page keeps its classic dir/lang markup; layout changes by WhatsApp may need periodic CSS updates.
  • The popup page still loads Font Awesome and the Rajdhani UI font from public CDNs (inherited from the original project). Font files for Urdu rendering are always bundled locally; nothing on web pages is loaded remotely.

Licensing and attribution

  • The original project is MIT licensed (c) 2022 Fahad Yousaf Mahar - see LICENSE.
  • Bundled fonts are redistributed with the extension under their own licences - see THIRD_PARTY_NOTICES.md.

Reporting issues / contributing

This is a community fork. Report issues and open pull requests on the fork's GitHub repository. Before contributing, read AGENTS.md at the repository root for the project conventions and testing workflow.

Changes are developed on top of the original upstream history; the original repository remains available as the upstream remote.

About

Community fork of WebUrdu — renders Urdu text in Firefox with selectable bundled Nastaliq fonts (Mehr, Awami, Gulzar, Noto Nastaliq, Noto Naskh).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages