CSUF LogoCSUF Site Navigation

F14 Drawing & Image Manipulation Programs Tgif

Department of Electrical and Computer Engineering
Associate Professor Gregory R. Kriehn
F14 Tgif

Tgif is another 2-D drawing program that runs using the X11 library on Linux and most Unix platforms. Although becoming dated, it is still a nice program to use in that it allows you to embed LaTeX code within a picture, provides an easy way of creating primitive objects such as rectangles, ovals, rounded-corner rectangles, arcs, polylines, polygons, open-splines, closed-splines, text, X11 bitmaps, and encapsulated postscript, and it can actually save pictures that are created with the program to postscript and encapsulated postscript.

Tgif is now available in the Fedora repository. However, for it to run properly, you MUST install the xorg-x11-fonts-ISO8859-1-75dpi and
xorg-x11-fonts-ISO8859-1-100dpi packages in addition to Tgif. The font packages contains the appropriate sized fonts (8, 10, 11, 12, 14, 17, 18, 20, 24, 25, 34) for Times, Courier, Helvetica, etc. To install the programs, use yum:
~> sudo yum install tgif xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-ISO8859-1-100dpi
When finished, source your ~/.bashrc file:
~> source ~/.bashrc
and launch tgif:
~> tgif &
Preferences for tgif are also set in the ~/.Xresources file, similar to idraw. I use the following options:
!## Tgif Preferences
Tgif.UsePsAdobeString: 3.0/3.0
Tgif.Geometry: 800x800+0+0
Tgif.InitialFont:              Times
Tgif.InitialFontStyle:         Roman
Tgif.PSA4PaperSize:            false
Tgif.InitialPaperSize:         8.5in x 11in
Tgif.DefaultEPSScaling:        1.7778  <-- good for letter
Tgif.gifViewer:                xv %s
Tgif.XpmToGif: xpmtoppm %s | ppmtogif | giftrans -t gray75

Tgif.MaxImportFilters: 4
Tgif.ImportFilter0: GIF-dither gif giftopnm %s | ppmdither | ppmtoxpm
Tgif.ImportFilter1: GIF gif giftopnm %s | ppmquant 222 | ppmtoxpm
Tgif.ImportFilter2: JPEG-dither jpg;jpeg \n\
       djpeg -gif %s | giftopnm | ppmdither | ppmtoxpm
Tgif.ImportFilter3: JPEG jpg;jpeg \n\
       djpeg -gif -colors 222 %s | giftopnm | ppmtoxpm
Save and exit, and use xrdb once again to load the preferences into memory:
~> xrdb ~/.Xresources
For help with additional preferences, simply read the man page.