Omega-J v0.0001: HOWTO
==================================================================

Requirements
------------------------------------------------------------------

TeX	  Preferably a recent distribution such as teTeX 1.0.
Omega	  If you have a recent TeX distribution, it's probably
	  included. Otherwise, you can obtain Omega from CTAN.
	  See http://www.tug.org/ for a partial listing of CTAN
	  sites.

TeX and Omega will run on any major computing platform. These
instructions, however, assume that you also have the following:

Linux     ... or a similar UNIX-like operating system.
Freetype  Visit http://www.freetype.org/ for info. Please take
	  note of the (potential) patent issue.
ttf2pk &  These tools are part of the Freetype project, but are
ttf2tfm	  not normally included in binary packages. You will
	  probably need to obtain the Freetype source code and
	  compile these programs (ttf2tfm is included with the
	  ttf2pk source).
Python	  ... in order to make an OVP file with the mkovp.py
	  script. See http://www.python.org/ for info about
	  Python.

Installation
------------------------------------------------------------------

1. Extract omega-j.tar.gz in any convenient location (which you've
   probably already done, if you're reading this).

2. Extract omj-texmf.tar.gz in the *parent directory* of an
   appropriate $TEXMF tree. For example, if you have the directory
   /usr/local/lib/texmf, you might do:

   $ cd /usr/local/lib
   $ tar zxvf ~/omega-j/omj-texmf.tar.gz

   This installs one or more OTP files in $TEXMF/omega/otp/, and one
   or more OVP files in $TEXMF/fonts/ovp/dynalab/.  The OTP file(s)
   should be usable as is; the OVP file(s) should be considered
   samples. They are based on Dynalab's Japanese TrueType
   fontsconsider it a sample, and *may* work if you use these or very
   similar fonts. If you have different fonts, you will need to create
   your own OVP files. See tools/mkovp.py for more info.

3. Compile the OCP file(s).

   Example:

   $ cd /usr/local/lib/texmf/omega/otp
   $ mkocp injis
   $ mv injis.ocp ../ocp

4. Prepare TFM files.

   Example:

   $ ttf2tfm DFHsm3.ttc ommincho@Unicode@ >ommincho.log

5. Create an Omega Virtual Font

   Steps a through d may be skipped if you are using the provided
   OVP file.

a) Prepare PL files for the TFMs.

   Example:

   $ for tf in *.tfm; do
   > tftopl $tf ${tf%tfm}pl
   > done

b) Prepare an OVP header

   This should contain global information about the virtual font,
   including MAPFONT entries for the TFM subfonts. If you are familiar
   with the OVP file format (which is very similar to VPL), you can
   write your own header. If not, you may be able to use the provided
   'ommincho.ovp-head', with more or less editing depending on your
   font, encoding, etc.

c) Prepare GIL files

   These files contain the glyph indexes to be found in each
   subfont. For more info, please read the documentation contained in
   mkovp.py.

d) Generate an OVP file

   Example:
   
   $ cd fontdata
   $ ../tools/mkovp.py

e) Compile the OVF

   Example:

   $ cd /usr/local/texmf/fonts/ovp/dynalab
   $ ovp2ovf ommincho
   $ mv ommincho.ovf ../../ovf/dynalab

6. Install the TFMs

   Example:

   $ mv *.tfm /usr/local/texmf/fonts/tfm/omega/

7. Make sure Omega can find your TrueType font

a) Place (or link) the TrueType font somewhere in $TEXMF/fonts

   Example:

   $ ln /usr/local/share/fonts/jp-ttf/DFHsm3.ttc \
         /usr/local/lib/texmf/fonts/truetype/dynalab/DFHsm3.ttc

   (I hard-link it because some TeX implementations have trouble
   with symbolic links)

b) Edit $TEXMF/ttf2pk/ttfonts.map

   Example entry:
   
   ommincho@Unicode@	DFHsm3.ttc	FontIndex = 0

c) Make ttfonts.map accessible to Omega

   It seems like this should be handled in texmf.conf, but I haven't
   been able to make that work. So I did this:

   # cd /usr/share/texmf/omega/dvips
   # mv psfonts.map hide.map
   # ln -s /usr/share/texmf/ttf2pk/ttfonts.map \
     /usr/share/texmf/omega/dvips/psfonts.map

   There's probably a way to use the name ttfonts.map instead of
   substituting it for psfonts.map. I just didn't feel like fiddling
   with that aspect of the problem.

8. And finally: rehash!

   # texhash

To test the magnificent creation, do something like:

   $ cd testdocs
   $ omega jchars2.tex
   $ oxdvi jchars2.dvi &

Let me know how it works out!

Matt Gushee
mgushee@havenrock.com