Xfig icon Xfig + Thai patches

Last updated 6 Nov 2003

Xfig is an interactive drawing tool which runs under X window system. Please visit Xfig User Manual to see the features and other information in detail.

Thai patches

Originally xfig doesn't support Thai. Because it supports some ISO-8859-x character sets and Japanese, it is not the hard work to make it support Thai. Supporting Thai implies that a user can type Thai character, can display Thai characters on the screen and, of course, can print or can produce Postscript document.

Requirements

In order to make xfig supports Thai. You need,
  1. Thaifonts-scalable package: This is the collection of Thai fonts in scalable formats, which are TrueType and Postscript font. We will use TrueType font for displaying on the screen and use Postscript font for printing.
  2. The system which can type Thai using XKB (X Keyboard Extension) method. Please see The XKB Configuration Guide.
  3. Using xfig in LANG=th_TH.TIS-620 environment.
You may need thaixfonts package also which is optional.

Source codes and patches

Here we will use xfig.3.2.4.full.tar.gz and transfig.3.2.4.tar.gz as original source codes. Here are the patches in gzip compressed format.
Below is the example of patching xfig.
$ tar xzvf xfig.3.2.4.full.tar.gz
$ tar xzvf transfig.3.2.4.tar.gz
$ gzip -d xfig.3.2.4.thai.diff.gz
$ gzip -d transfig.3.2.4.thai.diff.gz
$ ls
transfig.3.2.4/ xfig.3.2.4/
transfig.3.2.4.thai.diff xfig.3.2.4.thai.diff
$ patch -p0 < xfig.3.2.4.thai.diff
patching file xfig.3.2.4/Imakefile
patching file xfig.3.2.4/w_drawprim.c
patching file xfig.3.2.4/w_fontpanel.c
patching file xfig.3.2.4/w_i18n.c
$ patch -p0 < transfig.3.2.4.thai.diff
patching file transfig.3.2.4/fig2dev/dev/th_TH.TIS-620.ps
patching file transfig.3.2.4/fig2dev/Imakefile
$ cd xfig.3.2.4
$ xmkmf
$ make
$ su - -c make install.all
$ su - -c make install.man
$ cd ../transfig.3.2.4
$ xmkmf
$ make Makefiles
$ make
$ su - -c make install
$ su - -c make install.man

Usage and samples

I supposed you are using bash shell. In order to use Thai patched xfig, please run the command,
$ LANG=th_TH.TIS-620 xfig -international 
When you type Thai characters, there are 2 Thai fonts, Norasi and Garuda, with variants available. Belows are some screenshots and samples of files created by xfig.

Drawing window

Font menu

Contact

Please send a message to poonlap @ linux.thai.net if you have comments or questions.