XFIG Users Manual

[ English Version | Japanese Version ]

[ Contents | Operating Manual | New Features and Bugs Fixed
| Technical Information | Authors ]

[ Options and Resources | Installation | FAQ
| Japanese Support (or Internationalization?) | Fig Format 3.2 ]


Japanese Support (or Internationalization?)

xfig 3.2 and fig2dev 3.2 include code to make it possible to use Japanese text in xfig. Although it is not tested for languages other than Japanese, it uses the standard internationalization (I18N) mechanism of X11R5, and it may work for other languages with little or no change.

Send any questions about this Japanese support facility to VEF00200@niftyserve.or.jp.

Japanese Support

Using this Japanese support facility, you may enter Japanese text (and maybe other languages) on xfig in the manner described in Entering Japanese Text.

Environment

To use this Japanese support facility, you must have following environment:

Installation

Install Japanese-xfig

  1. Get xfig.3.2.1.tar.gz and gunzip and untar it.

  2. Uncomment ``#define I18N'' in xfig.3.2.1/Imakefile (remove the XCOMM comment).

  3. If your C library supports Japanese locale, remove -DSETLOCALE from the definition of I18N_DEFS. If your C library doesn't support the Japanese locale, make sure that -DSETLOCALE is specified.

  4. Compile and install xfig in the usual way.

Install Japanese-fig2dev

  1. Get transfig.3.2.1.tar.gz and gunzip and untar it.

  2. Uncomment ``#define I18N'' in transfig.3.2.1/fig2dev/Imakefile (remove the XCOMM comment).

  3. If you want to install japanese.ps (described below) to a directory other than /usr/local/lib/fig2dev, modify the definition of -DFIG2DEV_LIBDIR.

  4. Compile and install TransFig (fig2dev) in the usual way.

  5. Put the following lines to the file locale.ps (japanese.ps or ja_JP.eucJP.ps, for example) in the directory specified by -DFIG2DEV_LIBDIR (usually /usr/local/lib/fig2dev).

        % japanese.ps for fig2dev 3.2
        16 dict begin
          /FontName /CompositeRoman def    /FontType 0 def
          /WMode 0 def    /FMapType 3 def    /FontMatrix matrix def
          /Encoding [0 1] def
          /FDepVector [ /Times-Roman findfont
            /Ryumin-Light-EUC-H findfont ] def
          FontName currentdict
          end
        definefont pop
        16 dict begin
          /FontName /CompositeBold def    /FontType 0 def
          /WMode 0 def    /FMapType 3 def    /FontMatrix matrix def
          /Encoding [0 1] def
          /FDepVector [ /Times-Bold findfont
            /GothicBBB-Medium-EUC-H findfont ] def
          FontName currentdict
          end
        definefont pop
        % end of japanese.ps
    

Startup

  1. Set the locale name for Japanese (such as japanese or ja_JP.eucJP) to the environment variable LANG.

  2. If it is necessary, set the environment variable XMODIFIERS to specify the input method to be used.

  3. Make sure that the appropriate conversion server (Canna or Wnn, for example) and an input method (kinput2 or htt, for example) is available.

  4. Type ``xfig -international''.

    Without the -international option, xfig will work as normal (no Japanese). If you put ``Fig.international: true'' into your resource file, -international option may omitted.

Entering Japanese Text

Using this Japanese support facility, you may enter Japanese text with the TEXT facility. When entering Japanese characters in text, ``Times-Roman + Mincho'' or ``Times-Bold + Gothic'' must be selected as TEXT FONT.

Input of Japanese text will be started by typing a key to switch to Japanese-input-mode when it is ready to input text from the keyboard in TEXT mode. It depend on the environment as to which key will switch to the Japanese-input-mode, but keys such as Shift-SPACE, Control-SPACE, Control-O, or Control-\ may be used in many cases. Operations for conversion also depend on the environment, but will be the same as other applications which use the environment.

The input style may be selected from Off the Spot, Over the Spot, and Root. The input style to be used may be selected with the inputStyle resource or the -inputStyle option. For example, xfig -international -inputStyle OverTheSpot will select Over the Spot as the input style.

Off the Spot:
The text under conversion will be displayed at the bottom of the canvas. This may be reasonable in most cases.

[Input Style: Off-the-Spot]

Over the Spot:
The text under conversion will be displayed at the position where it will end up. But the display may be somewhat strange because it will be displayed with a different font. Also, it may lead to somewhat unusual behavior, or the display on the canvas may get confused.

[Input Style: Over-the-Spot]

Root:
The text under conversion will displayed in a separate window.

[Input Style: Root]

Additional Informations

Changing Display Fonts

By default, fonts to be used on the display (hardcoded in the program) is very loosely specified so that those fonts can found on any systems:

    Fig.normalFontSet: -*-times-medium-r-normal--16-*-*-*-*-*-*-*,\
	 -*-*-medium-r-normal--16-*-*-*-*-*-*-*,\
	 -*-*-*-r-*--16-*-*-*-*-*-*-*
    Fig.boldFontSet: -*-times-bold-r-normal--16-*-*-*-*-*-*-*,\
	 -*-*-bold-r-normal--16-*-*-*-*-*-*-*,\
	 -*-*-*-r-*--16-*-*-*-*-*-*-*

With this default specification, non-desirable fonts may loaded (bad appearance of texts or long delay when starting of xfig may caused as the result, for example) on some systems. In such case, you may need to specify those fonts more definitive in the resource file (app-defaults/Fig) and force the system to load the specified font:

    Fig*FontSet: -misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
    Fig.normalFontSet: -*-times-medium-r-normal--14-*-*-*-*-*-*-*,\
        -misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
    Fig.boldFontSet: -*-times-bold-r-normal--14-*-*-*-*-*-*-*,\
        -misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
    Fig.fontSetSize: 14

If scalable Japanese fonts are available, appearance of text may improved by specifying large fonts, as:

    Fig*FontSet: -*-times-medium-r-normal--16-*-*-*-*-*-*-*,\
        -foobar-mincho-medium-r-normal--16-*-*-*-*-*-*-*
    Fig.normalFontSet: -*-times-medium-r-normal--64-*-*-*-*-*-*-*,\
        -foobar-mincho-medium-r-normal--64-*-*-*-*-*-*-*
    Fig.boldFontSet: -*-times-bold-r-normal--64-*-*-*-*-*-*-*,\
        -foobar-gothic-medium-r-normal--64-*-*-*-*-*-*-*
    Fig.fontSetSize: 64

Note that you must set same size font for normalFontSet and boldFontSet, and size of those font to fontSetSize.

Changing Fonts on PostScript Output

By default, Ryumin-Light and GothicBBB-Medium will used when generating PostScript output.

They are specified in the japanese.ps file above, and it is possible to change those fonts by modifying the file.

For example, if you modify /Ryumin-Light-EUC-H to /HeiseiMin-W3-EUC-H and /GothicBBB-Medium-EUC-H to /HeiseiKakuGo-W5-EUC-H, then HeiseiMin-W3 font will used for Times-Roman + Mincho, and HeiseiKakuGo-W5 font will used for Times-Bold + Gothic.

Note

Tested Environments

At this time, Japanese-xfig has been tested on the following environments:

  --------------------------------------------------
     Operating System     X           Input Method
  --------------------------------------------------
   SunOS 4.1            X11R6            kinput2
   Solaris 2.5          X11R6            kinput2
   Solaris 2.5-2.6      OpenWindows/CDE  htt/ATOK
   HP-UX 10.20          X11R6            kinput2
   IRIX 6.3*            X11R6            kinput2
   FreeBSD 2.2          X11R6            kinput2
   Slackware Linux 3.1  X11R6            kinput2
   RedHat Linux 4.2     X11R6            kinput2
  --------------------------------------------------

* On IRIX 6.3, you may need to compile xfig with IRIX's genuine cc (not with gcc), specifying compile option -N32 -mips3. Also, you may need to get source of JPEG library and compile it yourself, to avoid using JPEG library distributed with IRIX.


Internationalization?

Although this Japanese support facility for xfig 3.2 is not tested for languages other than Japanese, it uses the standard internationalization (I18N) mechanism of X11R5/X11R6 and it may work for another languages with little or no change. Actually, it is tested that it can display text in Chinese (zh_CN.eucCN) and Korean (ko_KR.eucKR).

[Korean Text]

fig2dev is different, but it may possible to support those languages if there are LaTeX and/or PostScript printers that support the language.

Please contact to VEF00200@niftyserve.or.jp if you wish to try to make it available to use languages other than Japanese, or if you found that it does work for other languages.


Goto TOP

written by us