<HTML ><HEAD ><TITLE >Users' Guide</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Bangla in GNU/Linux HOWTO" HREF="index.html"><LINK REL="PREVIOUS" TITLE="Introduction" HREF="intro.html"><LINK REL="NEXT" TITLE="Developers' Guide" HREF="devguide.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Bangla in GNU/Linux HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="intro.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="devguide.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="usersguide" ></A >2. Users' Guide</H1 ><P > This part is mainly for the user - it does not go into the intricacies of development procedures. However, developers planning to work in this field must also read it - so that they can setup the required develoment environment. </P ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="locale" ></A >2.1. Setting up the locale for Bengali</H2 ><P >The first job that you have to do is to setup the locale for Bangla. The formal description of specific set of cultural habits for some country, together with all associated translations targeted to the same native language, is called the <SPAN CLASS="QUOTE" >"locale"</SPAN > for this language or country. This sub-section describes how to setup the <TT CLASS="filename" >bn_BD</TT > locale definition file, which is for Bangladeshi Bengali. However, the Indian Bengali definition file, i.e. <TT CLASS="filename" >bn_IN</TT >, can be used in the same manner. </P ><P > <DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > Remember that this sub-section is not intended to explain how to create a locale definition file, we will just explain how to <EM >use</EM > the locale defition file for Bangladeshi Bengali. </P ></TD ></TR ></TABLE ></DIV > </P ><P > The <TT CLASS="filename" >bn_BD</TT > file should come with the latest glibc package. in case you have an older glibc, you can download this file from the <A HREF="http://www.bengalinux.org/downloads/" TARGET="_top" >download</A > section of Bengalinux.org. </P ><P > <DIV CLASS="caution" ><P ></P ><TABLE CLASS="caution" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/caution.gif" HSPACE="5" ALT="Caution"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > Make sure you have some Unicode encoded Bengali fonts installed on your system. If you don't have one, check out <A HREF="usersguide.html#fonts" >fonts section</A >. </P ></TD ></TR ></TABLE ></DIV > </P ><P > Now issue the following command as <SPAN CLASS="systemitem" >root</SPAN >: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >localedef -f UTF-8 -i bn_BD bn_BD.UTF-8</B ></TT > </P ><P > This makes your system ready to be used with bn_BD locale definition. </P ><P > Now make sure your X server is ready for Bengali locale. Check the following file <TT CLASS="filename" >/usr/X11R6/lib/X11/locale/locale.dir</TT > </P ><P > It should have the following lines: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > en_US.UTF-8/XLC_LOCALE bn_BD.UTF-8 en_US.UTF-8/XLC_LOCALE: bn_BD.UTF-8 </PRE ></FONT ></TD ></TR ></TABLE ><P > Now your system is ready to use bn_BD.UTF-8 locale. For example, I use the following command to open up an <B CLASS="command" >xterm</B > with my own crappy font: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >LC_ALL=bn_BD.UTF-8 xterm -fn"-misc-Probhat-medium-r-normal--0-0-0-0-p-0-iso10646-1" -u8</B ></TT > </P ><P > Remember, if you want to use Bengali in any application, you will have to start that application under an environment where the locale was set to bn_BD.UTF-8, otherwise it won't work. </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="fonts" ></A >2.2. Installing the Bengali Fonts</H2 ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="install-rpm" ></A >2.2.1. Installing using the rpm package</H3 ><P > If you are a rpm [read: RedHat %#$!@] user, then the easiest way to install the fonts from <EM ><SPAN CLASS="acronym" >FBFP</SPAN ></EM > is by using the rpm package. The rpm package can be downloaded from <A HREF="http://www.bengalinux.org/downloads/freebanglafont-0.2-1.noarch.rpm" TARGET="_top" > http://www.Bengalinux.org/downloads/freebanglafont-0.2-1.noarch.rpm</A > or <A HREF="http://savannah.nongnu.org/files/?group=freebangfont" TARGET="_top" > http://savannah.nongnu.org/files/?group=freebangfont</A >. Just install the rpm package as you would do for any other rpm package with the command </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B > rpm -ivh freebanglafont-0.2-1.noarch.rpm</B ></TT > </P ></DIV ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="install-tarball" ></A >2.2.2. Installing using individual font file</H3 ><P > If you cannot or do not want to use the rpm package, there is always the good old tgz packages. Remember that you should have root privilege when you execute the commands mentioned here. </P ><P > Download the files you want to install from <A HREF="http://savannah.nongnu.org/files/?group=freebangfont" TARGET="_top" > http://savannah.nongnu.org/files/?group=freebangfont.</A > </P ><P > <DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > Remember that you will find several different tgz packages in <EM >FBFP</EM >. Each of them contain different font faces, i.e. they all look different from one another. </P ></TD ></TR ></TABLE ></DIV > </P ><P > Once you have downloaded all the packages you want, extract all the <TT CLASS="filename" >*.ttf</TT > file(s). Basically run the following command on each <TT CLASS="filename" >*.tgz</TT > or <TT CLASS="filename" >*.tar.gz</TT > you have downloaded. </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >tar -zxvf your_font_package.tar.gz</B ></TT > </P ><P > This will create a new directory that will contain different files that comes with the font package. We are only interested about the <TT CLASS="filename" >*.ttf</TT > files. </P ><P > Create a new directory where you want to install these fonts. For the rest of this document, we will assume we are installing the fonts in <TT CLASS="filename" >/usr/X11R6/lib/X11/fonts/bengali/</TT > </P ><P > Copy the <TT CLASS="filename" >*.ttf</TT > files we just extracted in to this directory, and execute the following commands: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >cd /usr/X11R6/lib/X11/fonts/bengali</B ></TT > </P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >ttmkfdir</B ></TT ></P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >mkfontdir</B ></TT ></P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >chkfontpath -q -a /usr/X11R6/lib/X11/fonts/bengali</B ></TT > </P ><P > Now we will add the new directory to <SPAN CLASS="application" >fontconfig</SPAN > configuration. Usually this configuration file is <TT CLASS="filename" >/etc/fonts/fonts.conf</TT >. Open this file with you choice of text editor and look for the part that looks somewhat like shown below </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/usr/share/fonts</dir> <dir>~/.fonts</dir> </PRE ></FONT ></TD ></TR ></TABLE ><P > Add the line <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" ><dir>/usr/X11R6/lib/X11/fonts/bengali</dir></PRE ></FONT ></TD ></TR ></TABLE > so that now it looks something like this: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > <dir>/usr/X11R6/lib/X11/fonts/Type1</dir> <dir>/usr/share/fonts</dir> <dir>/usr/X11R6/lib/X11/fonts/bengali</dir> <dir>~/.fonts</dir> </PRE ></FONT ></TD ></TR ></TABLE ><P > After you have saved the file, execute the following command: </P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >fc-cache</B ></TT ></P ><P > If you have GNOME print library ( <SPAN CLASS="systemitem" >libgnomeprint</SPAN >) installed, then execute the following commands: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B > cd /usr/X11R6/lib/X11/fonts/bengali</B ></TT > </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >libgnomeprint-2.0-font-install --dynamic</B ></TT > </P ><P > That should be it! If you have any problem, please let us know at <TT CLASS="email" ><<A HREF="mailto:users@bengalinux.org" >users@bengalinux.org</A >></TT > </P ></DIV ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="keyboard" ></A >2.3. Setting up the Bengali keyboard</H2 ><P > <DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > The intention of this HOWTO is <EM >not</EM > to explain what is xkb symbol file, or how to create a new layout, etc. There are tons of places on the web where one can find a better and more in-depth HOWTO about XFree86 keyboard[layout/xkb/etc]. </P ></TD ></TR ></TABLE ></DIV > </P ><P > There is nothing special about setting up a Bengali Keyboard, just follow the steps described below. Remember everything you need in the following steps can be downloaded from the <A HREF="http://www.bengalinux.org/downloads/" TARGET="_top" >download</A > section of Bengalinux.org, except the machine and the OS :-). </P ><P > <DIV CLASS="caution" ><P ></P ><TABLE CLASS="caution" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/caution.gif" HSPACE="5" ALT="Caution"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > Make sure you have some Unicode encoded Bengali fonts installed on your system. If you don't have one, check out <A HREF="usersguide.html#fonts" >fonts section</A >. </P ></TD ></TR ></TABLE ></DIV > </P ><P > Download the xkb symbol file <TT CLASS="filename" >ben</TT > and copy it to the directory where the other xkb symbol files are. Usually this would be <TT CLASS="filename" >/usr/X11R6/lib/X11/xkb/symbols</TT > </P ><P > <DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > <SPAN CLASS="acronym" >BTW</SPAN >, usually only root can copy files into this directory. </P ></TD ></TR ></TABLE ></DIV > </P ><P > You are now one command away from starting the keyboard. On my system I just type the following command: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >setxkbmap -symbols "us(pc101)+ben+group(ctrl_shift_toggle)"</B ></TT > </P ><P > On your system you are most likely to use a different value for <TT CLASS="option" >-symbols</TT >option. Let me explain what they mean, then you can decide what should be the value for your system. My default keyboard layout for X is <TT CLASS="literal" >us(pc101)</TT >. If you don't know what is the default you use, check the <TT CLASS="filename" >XF86Config</TT > file As the Bengali keyboard layout is defined in the second group we can simply add everything from <TT CLASS="filename" >ben</TT > to our keyboard layout. Now you have setup your keyboard with <TT CLASS="literal" >us(pc101)</TT > as group one and <TT CLASS="literal" >ben</TT > as your second group. What does that mean? Well in simple words: with X you can have different layouts in different groups and you can switch between these different layouts. And that is exactly why we added <SPAN CLASS="QUOTE" >"group(ctrl_shift_toggle)"</SPAN >. This means we can switch between the two groups by pressing <B CLASS="keycap" >ctrl</B >-<B CLASS="keycap" >shift</B > buttons together. Matter of fact there are other options for the toggle switch. If your XFree86 is new enough, you will find a file named <TT CLASS="filename" >group</TT > in the same directory you copied <TT CLASS="filename" >ben</TT >. If your system does not have this file do not worry. You can use an option like <SPAN CLASS="QUOTE" >"grp:shift_toggle"</SPAN > which will toggle by pressing both shift buttons. In which case your command becomes: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >setxkbmap -symbols "us(pc101)+ben" -option "grp:shift_toggle"</B ></TT > </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="Bangla-Application" ></A >2.4. Some "special" Bengali only applications</H2 ><DIV CLASS="sect3" ><H3 CLASS="sect3" ><A NAME="lekho" ></A >2.4.1. Lekho</H3 ><P > <SPAN CLASS="application" >Lekho</SPAN > is a text editor for creating Bangla Unicode files without using any type of Unicode font. </P ><DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > This section must not be taken as "The Complete Reference of Lekho". At best it can be regarded as a short introduction to the editor. The main purpose of this section is to make you aware of the presence of this wonderful editor. In any case, the primary source of information on Lekho is it's website or the documentation provided with the package distribution. </P ></TD ></TR ></TABLE ></DIV ><P > You may find <SPAN CLASS="application" >Lekho</SPAN > helpful if you are </P ><P ></P ><OL TYPE="1" ><LI ><P > Too lazy/busy to install the necessary Locale, Opentype fonts and Keyboard. </P ></LI ><LI ><P > Currently using a Gnome version prior to 2.0 . </P ></LI ><LI ><P > Don't have gtk+ in your system at all. </P ></LI ><LI ><P > Want to export as Latex for use with Bangtex macro package. </P ></LI ></OL ><P > Some of the major features of <SPAN CLASS="application" >Lekho</SPAN > are as follows </P ><P ></P ><UL ><LI ><P > Keyboard Layout- Phonetic (i.e. k=ka, kh=kha etc) </P ></LI ><LI ><P > Minimum Requirements- Qt 2.3 </P ></LI ><LI ><P > Font Usage- Adarshalipi </P ></LI ><LI ><P > Save As- UTF-8, UTF-16, ISO-8859-1 </P ></LI ><LI ><P > Export As- HTML, Bangtex </P ></LI ><LI ><P > Development Status- Beta </P ></LI ><LI ><P > Support- Through Mailing list </P ></LI ></UL ><P ></P ><OL TYPE="1" ><LI ><P > Download the latest tarball from Lekho's website at <A HREF="http://lekho.sourceforge.net" TARGET="_top" > http://lekho.sourceforge.net</A > (Rumours are that an RPM is on the pipeline. By the time you read this HOWTO, it may be already out. So please check it if you prefer RPMs). Now untar the tarball: </P ><P > <TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >tar xfz Lekho.tar.gz</B ></TT > </P ></LI ><LI ><P > 'CD' to the Lekho source directory and then go through the traditional way of compilation+installation: </P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >./configure</B ></TT > </P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >make</B ></TT ></P ><P ><TT CLASS="prompt" >bash$</TT > <TT CLASS="userinput" ><B >make install</B ></TT ></P ></LI ><LI ><P > At the very end of 'make install', the Adarshalipi fonts are copied to a seperate directory and the name of this directory is also printed. Now add that directory to your fontpath. There are several ways to do this depending on the XFree86 version you are using. Please consult Lekho's documentation for details. </P ></LI ></OL ><P > Although Lekho is still in development stage, it has enough features to meet the requirements of most people <SPAN CLASS="acronym" >IMHO</SPAN >. </P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="intro.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="devguide.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Introduction</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Developers' Guide</TD ></TR ></TABLE ></DIV ></BODY ></HTML >