Thaana text rendering: A solution for devices without the required fonts

A few years ago I wrote a PHP-based Thaana text rendering class while investigating solutions to the problem of displaying Thaana text in web browsers on various devices. The class dynamically converts any given Thaana text into a formatted image of given dimensions and type. The use of images to display Thaana means that the information can be viewed on a large variety range of devices and does away with the demand for the device to support Thaana fonts. On the flip side, the use of images does mean that this approach has higher bandwidth and data transfer requirements than text.

Features

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 of features it offers. However, since the GD library does not (or atleast did not, back then) support right-to-left scripts and does not offer line wrapping to fit text within a bounding box, custom code had to be written to handle the unsupported text direction and formatting. The class also supports use of any Thaana font, made possible by GD support for loading TrueType fonts.

Applications

This piece of code was briefly put to live use around 2004 on the (now defunct) MUnet.net's Radheef service. More recently, it has been put to great use by Muraasil.com to display Thaana on their mobile service so that user's can read news in Thaana on mobile devices, including Windows Mobile-based phones and the iPhone.

Demo

Give it a go and play around: Thaana text rendering demo.

I am not releasing the code publicly just yet...

Trackbacks

  1. No Trackbacks

Comments

Display comments as (Linear | Threaded)

  1. Simon says:

    Brilliant! Thanks for all the work my friend.

  2. asneem says:

    Great work... I have heard a lot about you.. Maybe we will get to bump into each other someday....

  3. yasiph says:

    Great! I was playing around GD library last week for a similar use. But was not successful hehe...

    U r using non unicode fonts on ur example! why?

  4. jaa says:

    @Yasiph
    If I recall correctly, the PHP GD library didn't have proper Unicode support back when I first wrote this...

  5. neo says:

    Unless you have a share in Muraasil.com I would say that it was rather unfair for Nattu to not have even acknowledged you when he talked about Text rendering in this DhiTV interview.

    http://www.youtube.com/watch?v=TNep2om-E8g

  6. jaa says:

    Thanks for the link. Some credit would have been nice indeed :-)


Add Comment


HTML-Tags will be converted to Entities.
Standard emoticons like :-) and ;-) are converted to images.