# FontForge install procedures
for cygwin under MS Windows

- Installing from a pre-built cygwin package
  - Before you install
  - Obtaining one of my pre-built packages
  - Installing
  - Notes
- Installing on a unix/linux system
- Installing on a mac
- Installing on VMS
- Building and installing from source
- Dependencies (external libraries/helper programs)
- Installing documentation
- Running FontForge

## Installing from a pre-built package

### Before you install

You must insure that you have cygwin installed on your system. Cygwin is free. (cygwin makes MS Windows look enough like unix to allow fontforge to run there). Getting all the bits of cygwin seems to be the hardest part of installing fontforge -- probably because it is the least expected part.

- First download the setup.exe program from http://www.cygwin.com/
- Run it. It will ask you what components of cygwin you wish to install
- You will need the default stuff, plus the X window system

  Most of what you need you get by default. But you must explicitly request X11. Scroll down the list of catagories:

  - Near (or at) the bottom, click on the [+] beside X11. Then make sure the following are selected:
    - X-startup-scripts
    - XFree86-lib-compat
    - xorg-x11-base
    - xorg-x11-bin
    - xorg-x11-dlls
    - xorg-x11-lndir
    - xorg-x11-etc
    - xorg-x11-f100
    - xorg-x11-libs-data
    - xorg-x11-xwin
    - xterm

  By accepting the default settings you actually download tens or hundreds of megabytes more than you need. L. Tikhomrov has actually gone through and figured out which packages are neccesary for a minimal install and has kindly written this up in a pdf document. It takes a bit more work, but if you are short on space (or time) it may be worth it.

- Once you have cygwin installed, start it. This should give you a terminal window running bash (a unix shell)

### Obtaining one of my pre-built packages

I post a cygwin install package on sourceforge's file release system. There's a certain amount of pother involved in using the file release system, but you get the file eventually.

- If you follow the link above you will end up on a page showing many releases of FontForge for many systems
  in most cases you will want the most recent release.
- Then click on the executable package you want to download:
  - The cygwin release will be called something like "fontforge_cygwin-200xxxxx.tar.bz2
- Then you have the joy of choosing a mirror site (pick one that's on the same continent you are) and click on the little icon in the download column
- Then you wait. After a bit you get another copy of this same page. After an even longer time your browser notices that you've started a download.

### Installing

I have no idea where your browser put the package you have just downloaded. This is unfortunate as I can't tell you exactly what to do next. But find the package (often it's on the desktop) and then move it into C:\cygwin\home\<username>. (where <username> is whatever name cygwin gave you)

- Then open a cygwin window (by clicking on the cygwin icon)
- With luck you will now be in the directory containing the package you downloaded.
- Now type (do not type the "$"):

  >     $ bunzip2 fontforge_cygwin-*.tar.bz2
  >     $ tar xf fontforge_cygwin-*.tar
  >     $ cd fontforge
  >     $ ./doinstall

- Then edit the file ~/.bashrc by (again do not type "$", use control-D (^D) to end):

  >     $ cat >> ~/.bashrc
  >     PATH=${PATH}:/usr/local/bin ; export PATH
  >     MANPATH=${MANPATH:-}:/usr/local/man ; export MANPATH
  >     ^D

- Then each time you want to run fontforge, type:

  >     $ xinit

- This should bring up X in a large window that covers the screen and within that should be a subwindow, an xterm, running bash.
- From the xterm you first start a window manager

  >     $ twm &

- And then you should be able start FontForge.

  >     $ fontforge -new

### Notes

Caveat: cygwin has a different approach to the file system than Windows. A filename like `C:\windows\fonts\arial.ttf` will be called `/cygdrive/c/windows/fonts/arial.ttf` under cygwin (backslashes are replaced by slashes, and the initial drive "`C:`" becomes "`/cygdrive/c`".

Similarly a cygwin filename "`/home/<username>/myfont.ttf`" becomes "`C:\cygwin\home\<username>\myfont.ttf`"

Caveat: Do NOT try to install a font by using fontforge to write the font directly to the Windows\Fonts directory. This doesn't work. Windows needs to do some magic when installing a font that it can't do if fontforge writes directly there. Instead have fontforge create the font somewhere else and then use Windows' own drag & drop technique to move the font from there into Windows\Fonts.

Caveat: I've been told that on Win 98 you need to have "Microsoft Network Login" installed to run X. I never found this to be true myself, but if you have problems it might be something to try.

- Building and installing from source
- Dependencies (external libraries/helper programs)
- Installing documentation
- Running FontForge