Dhivehi Phonetic (with Naviyani) Keyboard Installer for Windows

There is a small movement of people, especially from the Southern Maldives, that are calling for the re-instatement and celebration of the now discarded "naviyani" letter from Thaana script.

Naviyani used to be the 19th letter in the alphabet, placed between Daviyani and Zaviyani, until it was abolished in the early 1950s by then President Mohamed Amin. The letter represented a retroflex "n" sound, or "baru noonu" (heavy "noonu" character) as it is called in Dhivehi. The Unicode standard, used for text-representation on computers, did not include accommodations for "naviyani" when Thaana was first included in Unicode in standard version 3.0. The letter was eventually added in Unicode standard version 3.2 at code point U+07B1. As a result, many of the popular Thaana fonts have been updated in recent years to include the glyph for the letter. However, typing the letter has remained a hassle as the builtin Dhivehi keyboards on Windows does not map the letter to a key, forcing users to either type in the Alt + code combination or copying via the character map application.

I didn't realize there actually was a need for frequent use of the letter until various memes and pleas, from a growing community of people from the South of Maldives whose dialect apparently finds frequent use of the letter, cropped up on Facebook and Viber groups on the recent International Mother Language Day.

To ease the typing of the letter, I am releasing a Dhivehi keyboard input method for Microsoft Windows that adds naviyani to the standard "Divehi Phonetic" layout. Download the setup file from the link below and run it to go through breezy installation. You will need to restart Windows to get keyboard properly activated and accessible. You may then select the newly installed "Divehi Phonetic (Naviyani)" keyboard from the language settings under "Control Panel". You may disable/remove the built-in "Dhivehi Phonetic" keyboard option and use this instead as it is virtually similar in all other aspects.

When you have "Divehi Phonetic (Naviyani)" keyboard activated, the "naviyani" letter can be typed using RightAlt + n (or, alternatively Ctrl + Alt + N) key combination.

- Download Divehi Phonetic (Naviyani) Keyboard Installer

Hope this eases your work :-)

Filibari Keyboard for Thaana

I have just released a Thaana keyboard for Android called "Filibari Keyboard", featuring a new optimized key layout for faster and easier typing in Dhivehi.

This is probably the first publicly available keyboard designed specifically for efficient Thaana entry on mobile devices. Its experimental key layout is based on research data on finger reach and accessibility and Thaana character frequency analysis. The keyboard aims to place all frequently used characters within easy reach. Most notably, the layout places all the vowel signs or "fili" on a separate row at the top. The frequently used character keys are placed within natural thumb placement regions for further ease. I have a few updates planned as my time allows, with the new earliest release to add automatic diacritization, i.e. automatically adding fili to words when just characters are entered, which I wasn't able to finish polishing up for this release.

You can download "Filibari Keyboard for Thaana" on Google Play store now and should work on all Android devices running Android 4.2 and above. Since Android versions prior to 6.0 do not bundle a font carrying Thaana glyphs, you will run into issues of Thaana characters not being displayed correctly in apps that do not provide their own support for Thaana fonts.

Thanks goes to Asneem for the vibrant discussion that lead to this!

iOS users: I hope to push out a version of the keyboard for iOS devices soon.

Dhist launched!

During the Kickstart Hackathon 2015, Musannif and I spent a little while making a simple tool, which Musannif named "Dhist", to let you write, store and share Dhivehi text in Thaana using the web browser on the majority of the varieties of devices. It was written mostly to scratch our own itch but we welcome feedback and feature addition requests. Please share and use!

Check out Dhist

Thireefili: An experiment in removing the bottom diacritics in Thaana

This follows from a little chat Hamid Shafeeu and I had last night. Hamid suggested that the vowel diacritics written on the bottom of the letters in Thaana, the "ibifili" and "eebeefili", should be moved to the top to make the writing look cleaner (and other reasons he offered that I can't remember now). Anyway, the move requires minor changes and should be pretty apparent and easy to learn.

I've altered the FDL licensed "Thaana Unicode Akeh" font by "MITF" to bring the ibifili and eebeefili to the top and laterally inverted them to differentiate from the abafili and aabaafili vowel diacritics. The resulting font which I've called "ThireeFili", is available for download below. The font is free and is released under the Free Documentation License which it's ancestor follows.

I do not particularly like how the two new fili looks but I think moving the bottom diacritics to the top definitely brings a readability improvement. What are your thoughts?

- ThireeFili TrueType font (Thireefili.ttf) - 19.3 KB

Thaana on Android: Font Installer update

Early last year, I posted a font installer for Android that replaces the default fallback font with the free FreeSerif font that includes Thaana glyphs. That installer should still work on most older devices.

Here is a repackaged version of that installer which should work on most of the new devices with more recent versions of Android. This version has been tested on a Samsung Galaxy Note running Android 2.3.6 and a Samsung Galaxy S2 running the recently released Android 4.0 Ice Cream Sandwich.


1. As before, the device needs to be rooted. You can easily root your device using SuperOneClick (free/donationware).

2. Put the update zip file (see below) somewhere on your device. You could do this by downloading the file straight from the web on to the SD card of your device.

3. Power off your phone and boot into recovery mode. The specifics of how you do this depends on which recovery tool was installed during rooting of your phone. Try VolumeUp+Center Button+Power. If that doesn't work, use Google. If you have the CWM app installed, then you could just flash the zip through that.

4. Select the update from Zip option in your recovery tool and select the update_thaanafont_v2_jaa.zip file from the list and OK it.

5. The update should progress and will ask you to reboot once completed.

6. Congratulations you have a Thaana font installed. Thaana text on the Facebook, Twitter and other apps should appear OK now!

- Download update_thaanafont_v2_jaa.zip

Do drop me a message, here or on Twitter, if it works and if there are issues. Enjoy!

Thaana Text Render class for PHP 5 - v1.0

A (long) while back, I demoed a Thaana text rendering class for PHP I had written years ago that dynamically converts any given Thaana text into a formatted image of given dimensions with configuration options for important properties like font, font size and color. I am now releasing it, slightly improved, publicly for developers to use it in their applications.


The rationale for the class was that the use of images to display Thaana means that the information can be viewed on a large variety of devices and does away with the requirement for the device to support Thaana fonts. It can also be used for any purpose that requires dynamically generating an image with Thaana text in it, for example watermarking images or nice headings with your Thaana font of choice.

The class makes use of the powerful image manipulation services provided by the GD library to create images from text and hence inherits the wide range of features it offers. However, since the GD library does not support right-to-left scripts and does not offer line wrapping to fit text within a bounding box, the class requires the use of non-Unicode Thaana fonts and non-Unicode Thaana text. You can make use of my Thaana conversions class for PHP to dynamically convert Unicode Thaana text to ASCII Thaana text before passing it to this class for rendering.

Functions exposed

- render()
- renderImage()
- setFontPath()
- setFont()
- setFontSize()
- setTextColor()
- setTextLineSpacing()
- setBgColor()
- setShadow()


- PHP 5
- GD for PHP


The class is well commented so have a look through the code for more details on the functions and their arguments.

The class takes ASCII Thaana text and an optional width, filename, filetype for the render functions. The render() function returns a handle that can be used with the PHP image functions for further processing if required. The renderImage() allows the output to be returned directly or saved to a file.

If the width is specified, the resultant image will be constraint to that width and text will be wrapped around and split into lines as appropriate. Specify either "gif", "png" or "jpg" for the class to save the rendered output. If the filename is omitted, then it will return the output directly.

The class will accept any HTML/CSS color specification (i.e. "#FFF000", "red", "rgb(127, 127, 127)") as a valid color for use as text color, background color and shadow color. You can also specify alpha values to accompany them in order to have transparency effects. Set the background alpha to 127 to produce text on a transparent background.

All fonts have to be placed in the font path directory and should be named, in lower case, exactly as the font names passed to the class.


Saving to a file:
This example shows how to render the text and save the output. It sets all the properties for font, background and shadows at object initialization. The renderImage() function has the filename and filetype specified for saving the rendered output.
// Load the class

// Initialize object
$ttr = new ThaanaTextRender('./fonts/', 'a_waheed', 20, 'white', 0, 50, 'rgb(0,0,0)', 0, 2, '#555555', 80);

// Render image and save output
$ttr->renderImage('swaincsc', 300, 'output.png', 'png');

Output directly to browser:
This example is ideal for use in scripts that dynamically generate the required rendering and return the output directly to the browser.
// Load the class

// Initialize object
$ttr = new ThaanaTextRender('./fonts/', 'a_waheed', 16, 'white', 0, 50, 'rgb(0,0,0)', 127);

// Render image and save output
$ttr->renderImage('gUgulunc aepwlc awaimUvIaW vWdwkurW kwhwlw aeve. gUgulc aencDcroaiDc fOnutwkwSc mihWru vwnI mUvI scTUDiaOaeac dIfw aeve.', 300, NULL, 'png');

You could use it by, for example, calling it via the image tag.
<img src="script.php" />


You can check out the original demo I posted to see it in action.

For a real-world application of the class, check out the Muraasil mobile site which has been making good use of it for almost 2 years now.


This script is released under the Open Source MIT License, allowing its use in both personal and commercial applications as long as the copyright and license permission notice remains intact.


- ThaanaTextRender.zip (v1.0, 4.43KB)


Page to Unicode Thaana 1.0

Here's a nifty little tool I made a few years ago that automatically and intelligently picks out the bits of text that use a non-Unicode Thaana font on any web page and converts it to Unicode. That probably doesn't make much sense to most of you but read on - there's a section for general web users and one for developers.

General users

Take the website of Haveeru Daily as an example. It uses a now-archaic method of displaying Thaana. Browsers cannot and will not substitute an alternative workable font if your computer does not have the exact Thaana fonts it requires and will display as non-sensical English text. But then take Miadhu Daily, which relies on something called Unicode. Browsers can and will load up the site perfectly readable as long as you have any one of the many Unicode Thaana fonts on your system. And in many situations, like at public libraries or on some phones and devices like the Kindle, Unicode-based Thaana web pages will load up just fine as there usually is some Thaana-supporting Unicode font on it while those that use the more archaic method will fail.

I came across this problem a few years ago while at the university lab one day and there was some interesting events taking place in the Maldives which I wanted to read about. Haveeru had the most news articles and was the most up-to-date but I couldn't read any of it as the Thaana fonts were not on the system and I was not allowed to install the fonts. So I wrote some quick code, specifically a bookmarklet, that converted the text on the site on-the-fly to use Unicode.

Anyway, if you find yourself in a similar situation, here is what you could do. Right click the PUT bookmarklet link below and choose to bookmark the link. When on a page, just click the PUT bookmark and the page should convert to Unicode and display Thaana.

Page to Unicode Thaana bookmarklet v1.0


Haveeru before

Haveeru after


Here's a slightly different version of the above script that can be used on web pages that do not use Unicode Thaana to offer the pages in Unicode without requiring any change to the content management system, editor etc that you have in place already. Add the script to your non-Unicode Thaana based web pages where appropriate and your visitors will get a Unicode-based web page as long they have Javascript enabled.

I would recommend that it be added towards the end of your page HTML, right before the closing BODY tag.

- put-1.0.min.js (minified, for production use)
- put-1.0.js (full source)

Enjoy :-)