Difference between revisions of "Tibetan Editing on Linux"

From Digital Tibetan
Jump to: navigation, search
(New page: ==Installing fonts== Linux users can use all fonts that work on Windows PCs. For installation simply create a new folder 'Tibetan' at <code>/usr/share/fonts</code>. Copy all Tibetan fonts ...)
 
m (indicate hunspell-bo package)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
Linux fully support Unicode Tibetan. Tibetan is rendered correctly by almost all Linux applications. In order to make Linux support fully functional, one needs to:
 +
 +
* Install [[Tibetan Fonts|Tibetan fonts]]
 +
* Enable a [[Tibetan Input Method]] by following: [[Tibetan Input Method for Linux]].
 +
 
==Installing fonts==
 
==Installing fonts==
 +
 +
===Basic font installation===
 +
 +
====Sources for fonts====
 +
[[image:LinuxFontInstallation.jpg|thumb|400px|'''Img. 1''': Linux font installation with ''Font Viewer''.]]
 +
 +
* many Debian based systems contain a package <code>ttf-tmuni</code> or <code>fonts-tibetan-machine</code> which contains ''Tibetan Machine Uni'' or <code>fonts-noto</code> containing [https://www.google.com/get/noto/#sans-tibt Noto Sans Tibetan].
 +
* Get the latest ''[[Tibetan Fonts#DDC Uchen|DDC Uchen]]'' and ''[[Tibetan Fonts#Jomolhari|Jomolhari]]'' font by Chris Fynn.
 +
* See [[Tibetan Fonts]] for a list of Unicode Tibetan fonts.
 +
 +
Simply double click a <code>.ttf</code> font file and select "Install font" in ''Font Viewer'' (see Img. 1)
 +
 +
===Using the command line to install fonts===
 
Linux users can use all fonts that work on Windows PCs. For installation simply create a new folder 'Tibetan' at <code>/usr/share/fonts</code>.
 
Linux users can use all fonts that work on Windows PCs. For installation simply create a new folder 'Tibetan' at <code>/usr/share/fonts</code>.
 
Copy all Tibetan fonts into the folder <code>/usr/share/fonts/Tibetan</code>.
 
Copy all Tibetan fonts into the folder <code>/usr/share/fonts/Tibetan</code>.
 
Open a console and make sure that read permissions are given for all users for the Tibetan folder and it's content, e.g.:
 
Open a console and make sure that read permissions are given for all users for the Tibetan folder and it's content, e.g.:
  chmod -R 0666 /usr/share/fonts/Tibetan
+
  chmod -R a+rx /usr/share/fonts/Tibetan
 
Refresh the font cache with
 
Refresh the font cache with
 
  fc-cache -f
 
  fc-cache -f
 
Restart applications that use fonts (e.g. OpenOffice).
 
Restart applications that use fonts (e.g. OpenOffice).
===Sources for fonts===
 
* many Debian based systems contain a package <code>ttf-tmuni</code> which contains ''Tibetan Machine Uni''. (However this is a rather old version of this fonts)
 
* Get the latest ''[http://chris.fynn.googlepages.com/jomolhari Jomolhari]'' font by Chris Fynn.
 
* Get the latest version of ''Tibetan Machine Uni'' at [https://collab.itc.virginia.edu/access/wiki/site/26a34146-33a6-48ce-001e-f16ce7908a6a/tibetan%20machine%20uni.html THDL Virginia University]
 
  
==Installing a Tibetan input method for gnome==
+
===Selecting the Default Tibetan font for your environment===
For gnome you need the packages <code>uim</code>, <code>uim-m17nlib</code>, <code>uim-applet-gnome</code>.
+
This installs a Wylie input method (as part of <code>uim-m17nlib</code>) and a keyboard switcher that can be added to the gnome panel:
+
* Right-click the gnome-panel, select "Add to Panel..." and add the "Input Method Indicator (uim)".
+
* Within the configuration of UIM, enable the input method <code>"m17n-bo-wylie"</code>.
+
* Now open gnome text editor (gedit), select a Tibetan font, e.g. ''Tibetan Machine Uni'' and activate the input method <code>"m17n-bo-wylie"</code>.
+
* You should now be able to type Tibetan.
+
  
===Advanced customization===
+
The font selection is made through [https://www.freedesktop.org/wiki/Software/fontconfig/ fontconfig] which happens to be quite difficult to configure. We won't go into details in the different options, but we will present an example on which you can elaborate your own config. It selects [https://www.google.com/get/noto/#sans-tibt Noto Sans Tibetan] as the default Tibetan font for simple apps like Gedit, etc. but also websites. It does not affect full feature apps like LibreOffice (which has its own mechanism of default font for Tibetan script). It also shows how to magnify Tibetan text by 10% (you can skip that part if you don't need it. To make it work, save the file under <code>~/.conf/fontconfig/fonts.conf</code>:
It is possible to exchange or change the way the input method <code>"m17n-bo-wylie"</code> works: Simply edit (as root, make a backup first!)
+
/usr/share/m17n/bo-wylie.mim
+
to add or modify the translation from wylie into Unicode Tibetan.
+
This file serves as documentation of the input method and is also a good way to understand how the input method translates Wylie into Tibetan Unicode.
+
  
==Configuring applications==
+
<nowiki><?xml version="1.0"?>
 +
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 +
<fontconfig>
  
To configure OpenOffice to edit Tibetan text follow this guide:
+
    <alias>
[https://collab.itc.virginia.edu/access/wiki/site/26a34146-33a6-48ce-001e-f16ce7908a6a/openoffice%20writer.html Preparing OpenOffice for use with Tibetan Unicode]
+
        <family>sans-serif</family>
 +
        <prefer>
 +
            <family>Noto Sans Tibetan</family>
 +
</prefer>
 +
    </alias>
 +
 
 +
    <alias>
 +
        <family>monospace</family>
 +
        <prefer>
 +
            <family>Noto Sans Tibetan</family>
 +
</prefer>
 +
    </alias>
 +
 
 +
    <alias>
 +
        <family>ui-sans</family>
 +
        <prefer>
 +
            <family>Noto Sans Tibetan</family>
 +
</prefer>
 +
    </alias>
 +
 
 +
    <!-- add other blocks to also use Noto when the app looks for a serif font -->
 +
 
 +
    <!-- uncomment to make Noto Sans Tibetan 1.1 times bigger
 +
 
 +
    <match target="font">
 +
        <test name="family">
 +
            <string>Noto Sans Tibetan</string>
 +
        </test>
 +
        <edit name="pixelsize" mode="assign">
 +
            <times><name>pixelsize</name>, <double>1.1</double></times>
 +
        </edit>
 +
    </match>-->
 +
 
 +
</fontconfig>
 +
</nowiki>
 +
 
 +
==Tibetan Input Method==
 +
* Enable a Tibetan Input Method by following: [[Tibetan Input Method for Linux]].
 +
 
 +
==Tibetan spell checker==
 +
* Install the ''hunspell-bo'' Debian package to get a Tibetan spell checker at syllable level, usable in all applications
 +
 
 +
==See also==
 +
* [[How to edit Tibetan texts]]
 +
* [[Configuring OpenOffice for Tibetan script]]
 +
 
 +
==Internal Links==
 +
* [[Tibetan Fonts]]
 +
* [[Tibetan Input Method for Linux]]
  
 
==Additional information==
 
==Additional information==
 +
* [http://www.thdl.org/xml/showEssay.php?xml=/tools/fonts/getstartuni.xml&m=all Getting Started with Unicode Tibetan (THDL)]
 +
* [https://collab.itc.virginia.edu/access/wiki/site/26a34146-33a6-48ce-001e-f16ce7908a6a/using%20tibetan%20in%20linux.html Using Tibetan in Linux (THDL)]
 +
 +
==More information==
 +
* [http://www.thlib.org/reference/transliteration/teachingewts.pdf EWTS Extended Wylie system]
 +
 +
[[Category:How-to]][[Category:Tools]][[Category:Software]]

Latest revision as of 15:42, 28 August 2017

Linux fully support Unicode Tibetan. Tibetan is rendered correctly by almost all Linux applications. In order to make Linux support fully functional, one needs to:

Installing fonts

Basic font installation

Sources for fonts

Img. 1: Linux font installation with Font Viewer.
  • many Debian based systems contain a package ttf-tmuni or fonts-tibetan-machine which contains Tibetan Machine Uni or fonts-noto containing Noto Sans Tibetan.
  • Get the latest DDC Uchen and Jomolhari font by Chris Fynn.
  • See Tibetan Fonts for a list of Unicode Tibetan fonts.

Simply double click a .ttf font file and select "Install font" in Font Viewer (see Img. 1)

Using the command line to install fonts

Linux users can use all fonts that work on Windows PCs. For installation simply create a new folder 'Tibetan' at /usr/share/fonts. Copy all Tibetan fonts into the folder /usr/share/fonts/Tibetan. Open a console and make sure that read permissions are given for all users for the Tibetan folder and it's content, e.g.:

chmod -R a+rx /usr/share/fonts/Tibetan

Refresh the font cache with

fc-cache -f

Restart applications that use fonts (e.g. OpenOffice).

Selecting the Default Tibetan font for your environment

The font selection is made through fontconfig which happens to be quite difficult to configure. We won't go into details in the different options, but we will present an example on which you can elaborate your own config. It selects Noto Sans Tibetan as the default Tibetan font for simple apps like Gedit, etc. but also websites. It does not affect full feature apps like LibreOffice (which has its own mechanism of default font for Tibetan script). It also shows how to magnify Tibetan text by 10% (you can skip that part if you don't need it. To make it work, save the file under ~/.conf/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Noto Sans Tibetan</family>
	</prefer>
    </alias>

    <alias>
        <family>monospace</family>
        <prefer>
            <family>Noto Sans Tibetan</family>
	</prefer>
    </alias>

    <alias>
        <family>ui-sans</family>
        <prefer>
            <family>Noto Sans Tibetan</family>
	</prefer>
    </alias>

    <!-- add other blocks to also use Noto when the app looks for a serif font -->

    <!-- uncomment to make Noto Sans Tibetan 1.1 times bigger

    <match target="font">
        <test name="family">
            <string>Noto Sans Tibetan</string>
        </test>
        <edit name="pixelsize" mode="assign">
            <times><name>pixelsize</name>, <double>1.1</double></times>
        </edit>
    </match>-->

</fontconfig>

Tibetan Input Method

Tibetan spell checker

  • Install the hunspell-bo Debian package to get a Tibetan spell checker at syllable level, usable in all applications

See also

Internal Links

Additional information

More information