Open Source Entrepreneur – Launching a Project Successfully

Open Source Entrepreneur – Launching a Project Successfully

Being an open source entrepreneur is a long term effort and not just a weekend project. So think hard before you make the jump. More »

OSSummit – Open Source Summit 2017 is in LA this year

OSSummit – Open Source Summit 2017 is in LA this year

The OSSummit will be the highlight of the open source event of the year in North America. And if it is successful, we might see other smaller conferences focused around open source More »

Firefox Send – Snapchat for files

Firefox Send – Snapchat for files

Firefox Send allows users to upload files (word, pdf, spreadsheets, movies etc) up to the size of 1GB. The files are then encrypted and the link is sent to the end recipient. More »

How to setup virtual environment with Python3

How to setup virtual environment with Python3

In this tutorial, we will use Anaconda. It is an open source software, primarily designed to support scientific and analytic Python (and R) packages. More »

Coco – Opensource Blockchain framework from Microsoft

Coco – Opensource Blockchain framework from Microsoft

Blockchain technology is gaining a lot of interest in the enterprises these days. It is widely touted to be used and adopted initially by Healthcare, Finance, Supply Chain, manufacturing, IoT and many More »

 

Tag Archives: urdu

Writing Urdu using beautiful Nastaleeq font

Reading and writing in Urdu on Word, Web and even smart phone has become a standard. After all, there are over 200 million Urdu speaking Pakistanis and an additional 50 million worldwide audience that speak and communicate in this language. However, a good nastaleeq font is hard to come by. Even BBC Urdu uses a font that is so hard to read for a native Urdu speaker.

But there are ways around this mess. We can actually read and write in beautiful Nastaleeq font. I would also recommend reading the following post on how to write Urdu text on Web to get the formatting of the page correct for Urdu fonts. Things like right to left rather than the traditional left to right and encoding the text to UTF-8 etc.

Techie by day, blogger by night. Love the outdoors, enjoy traveling and building new and interesting things. Follow me if you want to know something.

How to write Urdu, Arabic or Persian text on Web

Languages like Arabic, Farsi and Urdu (AFU) use Arabic fonts and write from right to left rather than the usual left to write. To make any browser display text from the right side of the browser one has to define the following within the HTML tag

html dir=”rtl” lang=”ur”

The DIR tag defines the direction writing on the screen. RTL (Right to Left) or LTR (Left to Write). The LANG tag defines the language specified. In this case it is Urdu (ur).

Inside the HEAD tag we need to add the following meta tag to make it support UNICODE characters.

meta charset=”utf-8″

This tells the browser that non-ASCII characters can be expected and therefore should not garble up text when displaying. Wikipedia defines UTF-8 encoding as:

UTF-8 is an 8-bit variable-width encoding which maximizes compatibility with ASCII.UTF-8 uses one to four bytes per code point and, being compact for Latin scripts and ASCII-compatible, provides the de facto standard encoding for interchange of Unicode text.

And that’s it. Now whatever you write will be displayed properly in the browser. Here is verse from Faiz Ahmad Faiz’s epic poem, Tanhai

تنہایٰ

 

پھر کوی آیا دلزار، نہیں کوی نہیں

راہ رو ھوگا کہیں اور چلا جاے گا

Techie by day, blogger by night. Love the outdoors, enjoy traveling and building new and interesting things. Follow me if you want to know something.