Tgif Home
----
About Tgif
Current Release & Download
FAQ
Copyright Info
A Screendump of Tgif
Release History
Tools That Tgif Uses
Tools That Work with Tgif
Author of Tgif
Miscellaneous Info
----
 
Return to Tgif's Home Page
William Chia-Wei Cheng
(bill.cheng@usc.edu)
 

Tgif FAQ - Annotating Bitmap & EPS Files with Text Objects

 
I'm using tgif to add some text to an EPS file that I have imported. If I export the file in GIF format, everything looks fine. But when I export the file in PS/EPS format, all the text I added got shifted all over the place. How can I fix this?
The main problem you are observing is the difference between X fonts and PS fonts. The biggest discrepancy is with space characters! So, if your text has a lot of space characters, chances are, they will be very different when you print them in PS/EPS files. There's no easy way to get around this problem since a standard X Window System does not support things like True-Type fonts.

When you try to annotate an EPS file with text, you need to be very careful about where you put the text and how you put them. The main thing you need to decide is the Text Justification which determines the anchor of each text object. The anchor point in X and PS will be identical. The further away from the anchor, the worse things can get.

One quick and dirty way to fix the problem is to select all the text object and select BreakUpText in the Text submenu of the Edit Menu. Type c to break text objects into characters. Since every text object has its anchor, the X display will look very much like the PS output! However, fonts like Times, Helvetica, etc. can look really ugly. So, this quick and dirty approach is best used with Courier fonts.

If the EPS file are generated by xgraph or gnuplot, it's better to just export into tgif file format in xgraph or gnuplot.