Setting up to type Unicode Nepali in Ubuntu is easy (just add Keyboard Indicator applet and add Nepali Layout). For more, follow this article in Ubuntu Nepali wiki. However there are few glitches.
Incomplete keyboard layout
The Nepali Romanized Keyboard layout shipped with Ubuntu (located at /usr/share/X11/xkb/symbols/np) is incomplete. The definition for the whole upper row (1-0 keys) are missing. Also, more importantly, zero-width joiner (ZWJ) and zero-width non-joiner (ZWNJ) characters are wrongly defined (ref: standard layout map).
You can find the working version here: http://www.nepalinux.org/input/ne. So lets, fix it. Fire up your terminal
Glyph missing
$ cd /usr/share/X11/xkb/symbols/
$ sudo mv np np.bak
$ sudo wget http://www.nepalinux.org/input/ne -O np
The devanagari fonts included in the standard Ubuntu installation has few Nepali specific glyphs missing. Most notably, 'pareli ra' or 'samyukta ra' (whatever it is called, the one you use in the word 'paryo').
Well, the fix is to install a font file which has this glyph. My recommendation is Lohit Nepali, available at http://nepalinux.org/fonts/. At terminal,
Now if you want a specific font file (say, Kalimati) to be used as default devanagari font file, follow the following procedure.
$ cd /usr/share/fonts/truetype
$ sudo wget http://nepalinux.org/fonts/Lohit-Nepali.ttf
$ sudo fc-cache -fv
Create a file in /etc/fonts/conf.avail/
and paste the following content
$ sudo gedit /etc/fonts/conf.avail/64-ttf-nepali.conf
Now, create a symbolic link to it in /etc/fonts/conf.d/
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Kalimati</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Kalimati</family>
</prefer>
</alias>
</fontconfig>
You might have to restart X to see the changes.
$ sudo ln -s /etc/fonts/conf.avail/64-ttf-nepali.conf /etc/fonts/conf.d/64-ttf-nepali.conf
Hats off ! यो पोष्ट मलाई मन पर्यो है ।
ReplyDeleteThanks for the detailed description in the very useful topic. Keep on posting more like this!
ReplyDeletein my case there is no conf.avail directory in the font directory
ReplyDeleteI updated from Intrepid to Jaunty and after the update I end up with terminal and GDM fails to start. When I use startx, I ends up with a blank screen and mouse and keyboard doesnt' seem to work then.
ReplyDeleteI had setup Nepali Unicode in Ubuntu as suggested by you above and during the updation process it had issued a note that there were some incompatibility issues with my xkb layout. It this the problem with Jaunty? Any idea how do i resolve this issue?
Saurav
@anonymous: which distro are you using?
ReplyDelete@saurav: the method works on clean jaunty installation. maybe there's some issues with upgrade process.
Jwalanta:
ReplyDeleteCan I repair my Jaunty? I have a live CD? This might resolve the issue?
@saurav:
ReplyDeletei'm not sure, but give it a shot.
Thank you :-)
ReplyDeleteHow can I install traditional nepali unicode in ubuntu? I am new to linux. I used to use traditional unicode in windows.. now i have completely switched to ubuntu and I find romanized quite hard to understand. I would be grateful to know. I have bookmarked you. Cheers!!
Thanks for the post. This one still has a problem though. The latest Romanized keyboard layout has a few changes to the version posted above. For example, 'च' and 'छ' are swapped and a '.' has been added. It would be great if the link was updated. Thanks again!
ReplyDeleteI recently migrated to ubuntu and the chrome web browser doesn't seem to fully support unicode as the 'े','ै' and 'ु' and 'ू' are out of place. take a look at this: http://oi56.tinypic.com/2u900uw.jpg
ReplyDeleteany help would be great! thanks.
oh and it works fine in firefox and elsewhere.
@alok:
ReplyDeleteit's a known bug: http://is.gd/fwFzJ
infact this is a regression, there was no problem prior to 4.0
the bug's been fixed, will reflect in upcoming newer versions after the tests are complete.
i need some help here. i installed unicode that way and it worked fine. but later i noticed that messages in terminal are written in nepali fonts. also, my empathy chat client shows 'offline, away,chat, edit, help and rooms' in nepali fonts as 'offline, tadha, kurakani, sampadan garnus, madat and kotha' (sorry i couldnt write in devanagari font as i uninstalled unicode)
ReplyDeletenow i didnt want this change. i was trying to install only the keyboard layout. i dont know if this was created by the installation of unicode, but to check it i uninstalled unicode, the problem is still not solved.
can anyone help? maybe jwalanta ji? is it because of any other setting?
@Bidur ji:
ReplyDeleteTry System > Administration > Language Support
that was the first thing i tried when i discovered it. and then i tried again, and again, no recovery. its all right, i re installed ubuntu (it was really irksome to see 'lock screen' as 'parda ma talcha marnus' and all other things)
ReplyDeleteall i m concerned about now is, if i install unicode, will things go that way again?
i need unicode. but i dont like my terminal displaying 'pyakage haru kholdai' in devanagari :(
is there any link between installing unicode by the above method and the appearance of devanagari fonts everywhere? i just want to install the keyboard layout. any specific dos and donts?
@Bidur ji,
ReplyDeleteyou dont need to install Nepali locale just to type in Nepali. Devaganari fonts are installed by default in Ubuntu. Use iBus to enable Nepali typing (keyboard layout).
See this thread:
http://groups.google.com/group/foss-nepal/browse_thread/thread/5f7fad3de1fc0b10?pli=1
Three cheers for that. I just needed to know that it was called 'locale' (not so much of a genius here :(
ReplyDeleteall set done now.
thx
@jwalanta: Awesome!! Thanks.
ReplyDeleteIf I would want to type in traditional बकमन, how would i do this? I mean not in romanized but in unicode.
ReplyDelete@starx: try iBus. System > Preferences > iBus. Choose Nepali Traditional.
ReplyDeleteFixing Unicodes has always been a place where I find myself trapped...I am so thankful to Jwalanta for his efforts to resolve this issue...Great effort!!
ReplyDeletemy ZWNJ is working fine but instead of ZWJ it just types "=".
ReplyDeletehow can i solve this?
can not tye छ ट ठ ड in nepali traditional (Ubuntu)
ReplyDeletehow can i install unicode traditional nepali in ubuntu 16.04
ReplyDelete