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

Three years with magnetic implants

I always seem to remember a few days after... but the 22nd of this December marked the three year anniversary since I had tiny neodymium magnets implanted into the middle and ring fingers of my left hand in my attempt to explore and develop a new type of human-machine interface for my masters degree work.

Unlike the previous years which were uneventful, this year, a few months ago, I developed some discomfort and slight pain in my ring finger when I accidently applied too much sharp pressure on the area and upset the implant. It was the first time in three years that I had any sort of trouble from the implant. Luckily the internal wounds healed in a few days and the pain subsided. Below is an X-ray image of the implant I got done a few months ago and it looks like it is still safely tucked in where it was originally placed!

At the beginning of this year, I had set out to develop a smaller, less intrusive version of the external interface I had developed earlier with the goal of exploring the effects of wearing the interface for an extended period of time - 24 hours a day 7 days a week for 3 months. I did get around to hacking up a tiny interface package that I can wear as a ring on my finger. Sadly, for too many excuses and what not, I didn't get around to actually getting on with that bit of research.

So, here's to me actually getting on with wearing the new interface for three months beginning 2012. Fingers crossed!


X-ray image of the ring finger from a few months ago.


New, smaller, ring-sized external interface.

ZOHO Viewer plugin for jQuery

I discovered ZOHO Viewer, which supports a lot more file types than Google Docs Viewer, after I wrote the Google Docs Viewer jQuery plugin I posted earlier. So, I wrote another jQuery plugin that automatically embeds the ZOHO viewer for viewing the doc, docx, xls, xlsx, ppt, pptx, pps, odt, ods, odp, sxw, sxc, sxi, wpd, pdf, rtf, txt, html, csv, tsv files it supports linked to by anchor tags.

The ZOHO Viewer is an embeddable browser-based viewer that requires only a URL to a file available online. This, just like Google Docs Viewer, bypasses the need for users to have compatible software on their machines for those file types and displays the document right in the browser.

Both plugins work exactly the same and has the same configuration options. I ended up going back to Google Docs Viewer for the application I was developing because it displays the document zoomed in to fit the width of the viewer by default and has a toolbar to help navigate the document unlike ZOHO viewer. However, because ZOHO Viewer supports a much large range of file types it is still likely to become very handy.

Usage


1. Add jQuery and the zohoViewer plugin to the page.
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.zohoviewer.min.js"></script>
</head>

2. Set some class name or id to the anchor tag for all URLs to files that you want to be displayed using the ZOHO Viewer. E.g. "embed"
<a href="urltofile.pdf" class="embed">Download file</a>
<a href="urltofile.pdf" id="embedURL">Download file</a>

3. Initialize zohoViewer and set it to process the URL with id or all URLs with the class name set in the previous step.
$('a.embed').zohoViewer();
$('#embedURL').zohoViewer();

Customization


The plugin offers two configuration options that set the width and height of the embedded document IFRAME. This can be set when the plugin is initialized.
$('a.embed').zohoViewer({ width: 400, height: 500 });

The plugin inserts a the IFRAME for the viewer inside an injected DIV. The DIV tags all carry the class name "zohoviewer", which allow for styling all the zohoViewer instances via CSS. If the anchor tag has the ID attribute defined, then the injected DIV tag is also set an ID attribute in the format of ID_of_Anchor + '-zohoviewer'. See the demo source code for more details.

Demo


- Check out the live demonstration

License

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.

Download

- jquery.zohoviewer.v1.0.zip (v1.0, 2.2KB)

Enjoy!

Google Docs Viewer plugin for jQuery

Here's a little jQuery plugin I wrote recently that automatically embeds the Google Docs Viewer for viewing pdf, doc, docx, ppt and tiff files linked to by anchor tags.

The Google Docs Viewer is an embeddable browser-based viewer that requires only a URL to a file available online. This neatly bypasses the need for users to have compatible software on their machines for those file types and displays the document right in the browser.

Usage


1. Add jQuery and the gDocsViewer plugin to the page.
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.gdocsviewer.min.js"></script>
</head>

2. Set some class name or id to the anchor tag for all URLs to files that you want to be displayed using the Google Docs Viewer. E.g. "embed"
<a href="urltofile.pdf" class="embed">Download file</a>
<a href="urltofile.pdf" id="embedURL">Download file</a>

3. Initialize gDocsViewer and set it to process the URL with id or all URLs with the class name set in the previous step.
$('a.embed').gdocsViewer();
$('#embedURL').gdocsViewer();

Customization


The plugin offers two configuration options that set the width and height of the embedded document IFRAME. This can be set when the plugin is initialized.
$('a.embed').gdocsViewer({ width: 400, height: 500 });

The plugin inserts a the IFRAME for the viewer inside an injected DIV. The DIV tags all carry the class name "gdocsviewer", which allow for styling all the gdocsViewer instances via CSS. If the anchor tag has the ID attribute defined, then the injected DIV tag is also set an ID attribute in the format of ID_of_Anchor + '-gdocsviewer'. See the demo source code for more details.

Demo


- Check out the live demonstration

License

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.

Download

- jquery.gdocsviewer.v1.0.zip (v1.0, 2.2KB)

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.

Overview

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()

Requirements

- PHP 5
- GD for PHP

Usage


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.

Examples


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.
<?php
// Load the class
include('thaanaTextRender.php');

// 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.
<?php
// Load the class
include('thaanaTextRender.php');

// 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" />


Demo

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.

License

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.

Download

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

Enjoy!