<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>	
  <head>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
      <title>Thai patch for xfig</title>
      <META name="description" content="Thai patch for xfig"> 
      <META name="keywords" content="thai, xfig"> 
      <META name="distribution" content="global">
  </head>
  <div align="center">
  <body bgcolor="white">
      <table width="600" BORDER=0 cellspacing=0 cellpadding=0>
      <tr bgcolor="#5b84c1">
      <td align="left" valign="top"><img
      src="../images/corner_nw.gif"></td>
      <td align="right" valign="top">
      <img src="../images/corner_ne.gif"></td>       
      <tr><td colspan="2"><img src="./images/linux_banner.gif" alt="ZzzThai Project" ></tr>
	<tr bgcolor="#5b84c1">
	<td valign="bottom"> <img
	src="../images/corner_sw.gif"></td> 
	<td valign="bottom" align="right"> <img
	src="../images/corner_se.gif"></td> 
</tr>
</table>
	<p>
<table width="600" border="0" cellpadding="0" cellspacing="10">
	<tr><td valign="top" align="center" width="200">
	
	<table width="200" border="0" cellspacing="0" cellpadding="5">
	<tr bgcolor="#5b84c1"><th><font color="white">Home</font>
	<tr bgcolor="#fcffb2"><td><font color="green">
	<A HREF="../">Main</A><BR>
	<A HREF="../unix">Unix</A><BR>
	<A HREF="../linux">Linux</A><BR>
	<A HREF="../windows">Windows</A><BR>
	<A HREF="../mac">Macintosh</A><BR>
	
	<tr bgcolor="#5b84c1"><th><font color="white">Documents</font>
	<tr bgcolor="#fcffb2"><td><font color="green">
	
	<LI><A HREF="Thai-HOWTO">The Linux Thai HOWTO</A>
	<LI><A HREF="Thai-HOWTO-th">The Linux Thai HOWTO, in Thai language</A>
	<LI><A HREF="thailatex">Using Thai language with LaTeX</A>
	<LI><A HREF="sgmltools">Using Thai language with SGML-tools</A>
	
	
	
	<tr bgcolor="#5b84c1"><th><font color="white">Softwares</font>
	<tr bgcolor="#fcffb2"><td><a href="../softwares.html">Thai softwares
	</a>

	<tr bgcolor="#5b84c1"><th><font color="white">Fonts</font>
	<tr bgcolor="#fcffb2"><td><a href="../fonts.html">Free Thai fonts
	</a>


	</table>

	    <td valign="top">
	    <p>
	     
	     
	     <!-- content -->
	     <table border=0 cellpadding="0">

	     <tr><td bgcolor="#ffc456" align="right" valign="top">
	     Thai patch for xfig <img src="../images/corner_ne.gif"></td></tr>
	     <tr></tr>
	     <tr><td>
	     <br>

	     <H1 ALIGN=CENTER>Thai patch for xfig</H1>
	     <P>
	     When you create document or book, you need a good tool for creating figures. Xfig is one of good graphic tools available on Linux and it is free. Xfig is available at <a href="http://www-epb.lbl.gov/xfig">The Energy Performance of Buildings group (EPB)</a>. To use Thai characters with xfig, you should get xfig and transfig sources then patch them with patch files provided from this site.
	     </P>
	     
	     <H3>Download patch files</H3>
	     <a href="../softwares/xfig_thaipatch.tar.gz">xfig_thaipatch.tar.gz</a> : patch files, typeI font and samples.

	     <H2>Instruction</H2>
	     <OL>
	     <LI>Download <a href="ftp://www-epb.lbl.gov/xfig/xfig.3.2.2.tar.gz">xfig.3.2.2.tar.gz</a> and <a href="ftp://www-epb.lbl.gov/xfig/transfig.3.2.1.tar.gz">transfig.3.2.1.tar.gz</a>
	     <LI>Dowload <a href="../softwares/xfig_thaipatch.tar.gz">xfig_thaipatch.tar.gz</a> from this site.
	     <LI>Extract xfig.3.2.2.tar.gz and transfig.3.2.1.tar.gz, you will get xfig.3.2.2 and transfig.3.2.1 diretories.
	     <LI>Extract xfig_thaipatch.tar.gz with command "tar xzvf xfig_thaipatch.tar.gz" you will get the following files in xfig_thaipath directory.
	     <UL>
	     <LI>dbtt.pfa
	     <LI>fig2dev_thaipatch
	     <LI>xfig_thaipatch
	     <LI>thai_demo.fig
	     <LI>thai_demo.eps
	     <LI>README (in Thai language)
	     </UL>
	     <LI>Copy fig2dev_thaipatch to transfig.3.2.1/fig2dev directory and copy xfig_thaipatch to xfig.3.2.2 directory.
	     <LI>Change directory to xfig.3.2.2 and run command "patch < xfig_thaipatch"
	     <LI>Change directory to tranfig.3.2.1/fig2dev and run command "patch < fig2dev_thaipatch"
	     <LI>Compile and install both xfig and transfig.(Read README or INSTALL file if you don't know what to do)
	     </OL>
	     
	     <P>
	     The DBThaiText font button will appear in font selection dialog. Note that the patched xfig will use "-thai-dbthaitext-medium-r-normal--*-*-*-*-*-*-tis620-0" font pattern, so if your DBThaiText fonts have name like "-thai-dbthaitext-medium-r-normal--*-*-*-*-*-*-iso8859-1", error will occur. If you don't have Thai X fonts, download <A HREF="redhat/SOURCES/thaixfonts-0.1-2.tar.gz"> thaixfonts-0.1-2.tar.gz</A> or in <A HREF="redhat/RPMS/i386/thaixfonts-0.1-2.i386.rpm">rpm format</A>. 
	     </P>
	     <IMG SRC="./fig/xfig_snapshot2.jpg" ALIGN=CENTER>

	     <P>
	     You can type Thai characters by <A HREF="Thai-HOWTO/Thai-HOWTO-2.html#ss2.2">configuring Thai keyboard</A> then type Thai characters directly in xfig.
	     </P>
	     <P>
	     You can export xfig format file(.fig) file to eps(Encapsulated Postscript format) format file by select export button. Xfig program will call transfig program to convert file format. Eps file that includes Thai characters will use DBThaiText Adobe TypeI font(dbtt.pfa). You must configure ghostscript to recognize DBThaiText font.
	     </P>

	     <H3>Configure ghostscript</H3>
	     Becasue transfig does not embed Thai font in eps file, you must configure ghostscript(gs) to recognize DBThaiText font.
	     <OL>
	     <LI>You should know where is your ghostscript directory is. Normally, it should be at /usr/share/ghostscript.
	     <LI>Copy file dbtt.pfa to /usr/share/ghostscript/fonts
	     <LI>Add the line 
	     <PRE>/DBThaiText         (dbtt.pfa)      ; </PRE>
	     at the bottom of file "/usr/share/ghostscript/4.03/Fontmap"
	     <BR>
	     Note that 4.03 is ghostscript version number. This example may be different from your system.
	     <LI>To view eps file use ghostview program or gv. These programs are frontend of ghostscript.
	     </OL>
	     <P>
	     In case of using postscript printer which does not recognize DBThaiText font, you should copy content of dbtt.pfa to somewhere in exported eps file.
	     </P>	     
	     
	     </tr>
	     </table>
	</tr>
        
	
	<tr><td bgcolor="#CCCCCC" colspan=2>
	<address><a
	href="mailto:uecthai@fedu.uec.ac.jp">uecthai@fedu.uec.ac.jp
	</a></address>  
	 Last modified: Sun May 30 15:00:44 JST 1999




      </table>
      </div>
      
       
  </body>
</html>

