Category Archives: How To

How-tos, tips and tricks about Telugu on internet, computers and mobiles

CSS3 & Telugu: Letter Spacing

CSS has a property called letter-spacing, which allows web authors to style thier text such that letters can be spaced out. E.g.:

C R O S S R O A D S

Things get interesting for Telugu. A character or letter from the the user’s perspective can actually contain multiple Unicode code points. For example, “స్త్రీ” is one character/letter. Similarly, “స్ట్రాంగ్” has two characters.

When letter spacing is applied to Telugu text, web browsers need to add additional space between characters. What matters is what is considered a letter by each browser might vary.

I tried to test this in few web browsers. It worked properly in Mozilla Firefox and Google Chrome browsers. However, IE 11 has issues. Here is an image showing rendering across these browsers at the time of this post:

Rendering Telugu text with letter-spacing applied in major web browsers

Here is a test page for you to see how your web browser shows it. I didn’t have access to Microsoft Edge browser. If you are using Windows 10, please post a screenshot of that test page from Edge browser.

CSS3 and Telugu: Ordered lists with Telugu numerals and alphabet

It is a custom that ordered lists are presented with numerals or alphabet. And, Telugu web sites would want to present lists in their pages in Telugu numerals or alphabet. For example:

౧. శుక్రుడు
౨. బుధుడు
౩. భూమి
౪. అంగారకుడు

Or, with alphabet:

అ. శుక్రుడు
ఆ. బుధుడు
ఇ. భూమి
ఈ. అంగారకుడు

CSS3 makes these possible. CSS3 added a concept called counter styles and extended list-style-type property to accept any defined counter style as a value. CSS3 also added predefined counter style called telugu for Telugu numerals.

That means we can just write the following CSS for ordered lists to show up with Telugu numbers:

ol {
  list-style-type: telugu;
}

See this in action. At the time of writing this, it is working fine in Firefox and Chrome. Not in IE 11, though.

CSS3 did not define a counter style for lists with Telugu alphabet. But, the whole point of counter styles is to let web authors write their own counter styles. So, we can define our own list styles.

Let’s first define a counter style:

@counter-style telugu-alphabetic {
  system: alphabetic;
  symbols: 'అ' 'ఆ' 'ఇ' 'ఈ' 'ఉ' 'ఊ' 'ఎ' 'ఏ' 'ఐ' 'ఒ' 'ఓ' 'ఔ' 'అం' 'అః' 'క' 'ఖ' 'గ' 'ఘ' 'ఙ' 'చ' 'ఛ' 'జ' 'ఝ' 'ఞ' 'ట' 'ఠ' 'డ' 'ఢ' 'ణ' 'త' 'థ' 'ద' 'ధ' 'న' 'ప' 'ఫ' 'బ' 'భ' 'మ' 'య' 'ర' 'ల' 'వ' 'శ' 'ష' 'స' 'హ' 'ళ' 'క్ష' 'ఱ';
}

Now, we can use it as follows:

ol {
  list-style-type: telugu-alphabetic;
}

See this in action. This works in Firefox. Sadly, other browsers do not yet have support for user defined counter styles (@counter-style rules).

These counter styles can be extended to achieve different formatting needs like placing the number or letter in parentheses. Something like below:

(అ) శుక్రుడు
(ఆ) బుధుడు
(ఇ) భూమి
(ఈ) అంగారకుడు

I compiled few counter styles for Telugu covering major use cases, including styles with parenthesis. What else do you think should be covered?

Telugu Unicode to Anu font converters

Now-a-days, lots and lots of Telugu content (both online and offline) is being created in Unicode. There are many free typing tools for Telugu (even, on mobile phones too). People no longer need to buy proprietary fonts and text editors to compose in Telugu. And, a good number of beautiful Telugu Unicode fonts are available for free download, thanks to Telugu Vijayam project of earlier joint Andhra Pradesh government. (These Telugu fonts are also available in Google Fonts.)

Modern publishing tools such as Adobe InDesign have support for Unicode Telugu. And, many people have already published their books in Unicode.

Despite that, most of the Telugu publishing and printing industry and small DTP operators have not yet moved to Unicode. (We need to create awareness of Unicode and its benefits for Telugu content and publishing industry.)

Because the Telugu publishing industry and media still using proprietary fonts, people are looking for tools to convert Unicode text into Anu and other proprietary Telugu fonts for printing.

Here are a couple of links that try to convert Unicode Telugu text to Anu fonts:

Continue reading Telugu Unicode to Anu font converters

CSS3 and Telugu: Drop caps using ::first-letter pseudo element

In the publishing world, it is a convention to style the first character of the article/story distinctively. Drop cap example When it comes to the web, people use different techniques to achieve the same, famous being adding extra markup around the first letter. With ::first-letter pseudo element being available in all modern web browsers, it became the simplest way to achieve drop caps.

For example, to style the first letter of every paragraph, we can use the following CSS rule:

Continue reading CSS3 and Telugu: Drop caps using ::first-letter pseudo element

InScript+ keyboard layout for Telugu

InScript+ an enhanced InScript keyboard layout for Telugu

Unicode 6.0 has standardized code points for Telugu characters. However, the classic or old characters cannot easily be typed. So, C-DAC has come up with proposal called Enhanced InScript Keyboard Layout. (You can get their proposal from their web site.) I implemented their proposal for Telugu in the name of InScript+.

With this keyboard layout you can type all the Telugu characters that are currently in Unicode 6.0 standard. The layout looks as follows:

InScript+ keyboard layout for Telugu

For more details about those old characters, please see this post in my Telugu blog.

How to get this keyboard layout for your computer? Read on. Continue reading InScript+ an enhanced InScript keyboard layout for Telugu

Viewing Telugu in mobiles and smartphones

Update (Jan 1 & Mar 13, 2014): Latest models of smart phones come with built-in support for Telugu. Here is a summary:

  • Android: Android has gained support for Telugu since 4.2 (Jelly Bean), which became available from about end of the year 2012. (Seach for Telugu in this page.) That means all new Android phones (from whatever company) with versions 4.2 and above should render Telugu correctly.
  • iPhone, iPad: Any phone/pad with iOS 4 or newer versions should support Telugu.
  • Windows Phone: Any phone with Windows 8 or newer versions should support Telugu.
  • Firefox OS: Any phone with Firefox OS 1.3 or above versions will support Telugu.

If your phone has the latest OS as said above and is not showing Telugu characters (say when you visit a Telugu website), it could be because the phone company stripped multilingual support. Contact your phone company.

You might want to look for apps for typing Telugu.

The below is earlier version of this post for reference purposes.

Continue reading Viewing Telugu in mobiles and smartphones

Converting text from Anu to Unicode

When you use Anu Script Manager, the resulting text will not be in Unicode. That means you cannot effectively use that text on the web: (1) Users see it as junk characters unless they have necessary Anu fonts. Not everyone can get Anu fonts as they are not free. (2) Worst part is that Google and other search engines do not understand that your text is in Telugu and cannot show your website in their results for Telugu searches.

The best way is to use Unicode. There are few converters that convert text from Anu to Unicode:
Continue reading Converting text from Anu to Unicode