Archive for the ‘Fonts’ Category

Clear the bug in Existing tamil fonts.

December 21, 2009

By default ubuntu have Three Tamil font in a debian package(ttf-indic-font) the three fonts are TAMu_Maduram.ttf, TAMu_Kalyani.ttf,TAMu_Kadambari.ttf, but those three fonts are not mapped Unicode, it means we couldn’t type both Tamil and English in a document using this font because some Tamil characters are occupy in the places of English character.

Typing both English and Tamil(error)

TAMu_Kalyani.ttf,TAMu_Kadambari.ttf Those font are now cleared the bug in the name of Kalyani.ttf and Kadambari.ttf.

Bug image on TAMu_Kalyani.ttf

Now you can see the red box in  fontforge  Tamil glyphs  are occupy in  the places of
English glyphs and also ligature are not used.

image on Kalyani.ttf

In this image you can see the red underline in that the selected glyph Unicode name will display.  All the glyphs are properly matched in their Unicode place.

Typing both English and Tamil


Now you can type both English and Tamil.

Steps to Clear the bug

Creating Tamil Fonts

September 29, 2009

In Ubuntu, when install the tamil fonts they store in the location /usr/share/fonts/truetype/ by default.In fedora the tamil fonts are located in /usr/share/fonts/

Creating New fonts:

Tools:

* Inkscape(Inkscape Vector Graphics Editor)

* Fontforge

* GIMP Image Editor

Draw the Tamil Characters in paper using Indian ink and scan it. When you are scanning save the image as pdf.

Step 1:

1. Open the image using GIMP(Gnu Image Manipulation Tool)

2. Press r to select the rectangle select tool and draw a rectangle over one glyph.

3. Cut the glyph (ctrl + x) and paste it in a new page.

4. Save that glyph with the extension of .jpeg

When we save the image as jpeg it prompt a window to export that image.

6. Open the jpeg image using inkscape.

7. First select the image. Then to trace the bitmap from that image.

8. Select grays and set scans as 4 then press OK. It takes some time to trace the bitmap

9. After it trace the bitmap there are two images came. One is the original image and the other is the traced one.

Select the original image and delete it.

10. Finally you have only one image. From that select the glyph and drag it to side.

11. Select all(ctrl+a) and change the color as black

12. Select the rectangle black box and delete it. Then drag the glyph inside it. There are three glyph, choose the best one as your wish.

13. Set the proper base line and height line. Place the glyph between those two line.

Import the glyph in Fontforge:

Step 2:

Phase – I

1. open a new fontforge through Application -> Graphics -> Fontforge

2. Change the fontinfo through Elements -> Fontinfo

3. Give the name for the font

4. By default fontforge doesn’t have the unicode slots for tamil so we have to add a new slot for one tamil character then save it and reopen it we can get remaining encoding slots.

5.After add the encoding slot you will get one box with this symbol on the head ‘?’.

This means it doesn’t have name, we should give the name to it.

6. To give the name and other information about the glyph, write click the box and select the glyph info.

7. Give the name for the glyph.( First time only you should give the unicode name of any tamil character)

8. Double click the box then import the glyph which is saved in Inkscape.

9. After import the glyph you should align it as right or left or center.

10. Save the font. The default extension is .sfd(Spline Font DB)]

11. Generate the font as ttf(True Type Font). It takes the font name as we specified in the fontinfo section and generate fontname.ttf

12. Close the font again open the .ttf file of that font using fontforge, now you can see the slots for all tamil unicode character.

13. Import all the Unicode glyphs  in the same way.

Unicode map:

you can get the Unicode chart from here:Tamil unicode chart

Phase – II

Add lookup table

1.To write ligature we need lookup tables, Element > FontInfo >Lookups

2.Then click Add lookup button on right hand side.

3.change the Type as ligature substitution.  In  feature  a drop down list is available  from that we change the feature as Above Base Substitution , Below Base Substitution and Halant Forms based on our glyph.

3(i)In the Scripts(s) and Language(s) column two language are come DFLT(dflt) taml(dflt) here we need only tamil language so we delete DFLT(dflt) .

3(ii)The lookup name is automatically changed as ‘abvs’ Above Base Substitutions lookup 0 then press ok.

3(iii)Adding sub table in that select the any lookup and press add sub table by default the subtable name is ’abvs’ Above Base Substitutions in Tamil lookup 0-1 should change it as ‘abvs’ Above Base Substitutions in Tamil lookup 0 subtable.

3(iv)After adding  all the lookup tables.

4.Next our goal is to create ligature(Adding two characters and create new character) For example to create Ki using ka and i that is Ka=ka+i. The following are steps to create ligature

4(i)Add the empty slots for ligature glyphs which doesn’t have unicode values. Encoding->Add Encoding slots. A message box appear like the following figure.

How many slots you need enter the number in the text box, New boxes are created without Unicode values.

For example: Here i write the ligature for the letter கி=க+ி

import the glyph in the empty slot right click the box choose glyph info, change the

unicode name as Tam_ki by default the unicode value is -1

choose ligature here a table is available with two columns titled as  subtable and source glyph names.In the subtable column the dropdownlist shows the lookup subtables which are already we add.

choose the lookup subtable which is apt to our glyph.Here i choose abvs ‘ Above Base Substitutions in Tamil lookup 0.

In the source glyph names column type the Unicode name of the two glyph  for example uni0b95 uni0bbf  is for ki. press ok this way you can create the ligature for all glyphs  which doesn’t have Unicode values.

save and generate the font:

From the file menu choose  Save.  The default extension is .sfd(Spline Font DB)], Generate the font as ttf(True Type Font). It takes the font name as we specified in the fontinfo section and generate fontname.ttf.

open the terminal:

create the directory .fonts in your  home directory.  copy the font’ s ttf file  to this  directory then give the command to compile the font to your local system.

fc-cache -f -v

Open the open office word processor in there your font will available in the fonts list