Status: offline
Registered: 05/30/2006
Posts: 2
|
Hi
I've used igi to produce figures for a textbook. IGI uses the same
Roman fonts as Mongo and Supermongo, which are seen very frequently
in papers in the astro journals. However, the illustration expert at
Princeton University Press has complained that these fonts are very rough
and bumpy (this can be seen easily at high magnification -- look, e.g.,
at a "0") and that they therefore give the figures a sloppy look.
Warren Hack at STSCI has told me that changing to nicer fonts in IGI
is possible, and to just follow the instructions in the IGI manual. However,
the instructions seem opaque in this case, and when I mimic the example
that they give I get fonts that look much worse.
Will appreciate any help.
Dan
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Hi Dan,The short answer is that not all text is the same: IGI fonts can indeed be changed in a number of ways, either from within the IGI script itself or in the graphcap definitions for the output device being used. However, IGI still makes use of the graphics I/O system to e.g. draw labels around plots in some cases and the label fonts are stroke-based fonts (where the stroke dataset is tables$lib/miifont.h) and not necessariily the PS font you may have specified in IGI to draw a text string (i.e. the labels around a plot may look different than a text annotation string you put on the plot itself).First, to change the IGI font within the script you need to do something like[code:1:f7697c5083]FONTSET hard
PSFONT Helvetica
....other igi stuff
PUTLABEL 5 \fPThis is a test\fR[/code:1:f7697c5083]The first two commands tell igi to use hardware fonts and specifies the postscript font you wish to use (Helvetica). The '\fP' is a text escape sequence saying to switch to the user-defined PS font, btu applies only to that string. If the "other igi stuff" includes say a BOX command the labels are drawn using the stroke data and so the magnified zero looks funny.Another method is to modify the graphcap file: If you're using the PSIKERN postscript kernel then there are parameter you can set to specify the default font set (specifically the FR/FB/FI/FG fields to set the roman/bold/italic/greek fonts respectively, see "help psikern opt=sys" for details), but the will only change the default font and save you from the \fP part of the string. It will not however, modify the stroke-based fonts.So, what can be done? Well, you can try playing with the line widths and resolutions to smooth the shapes, although beware this is by no means perfect either. For example,[code:1:f7697c5083]
irafnet|psplot| :DD=psi_def,tmp$psk,!{ mv $F psplot.ps; }&:\
:ch#0.03:cw#0.02:xs#0.2:ys#0.2:PI#0.8:PW#0.0002:\
:FR=Helvetica:FB=Helvetica-Bold:tc=psi_square:
[/code:1:f7697c5083]will define a new device named 'irafnet' or 'psplot' that uses the PS Kernel to create a file 'psplot.ps' in the current directory where the default font is Helvetica. However, we've also tweaked the size of the characters (the ch/cw and xs/yx fields) and the line width (the PI and PW) so the lines are a bit thicker and the character larger. Magnified, the zero looks more round but you can still see gaps. When printed this may be okay. Sizes here are specified in NDC (normalized device coords, range 0 to 1) units and you can play more with them. Also of interest are fields such as xy/yr to set the page resolution, 'ar' for aspect ratio, etc. The psikern manual above will have more fields but not also that these particulars apply only to the psikern, there are similar fields for other graphics devices using the simple graphics kernel (the main difference being psikern will preserve color, the sgikern won't).To use the graphcap above you'll need to make a private graphcap file and specify the new device when you call igi, e.g.[code:1:f7697c5083]
cl> copy dev$graphcap home$graphcap # make private copy
cl> edit home$graphcap # edit the file
...add the above graphcap entry near the top somewhere
cl> reset graphcap = home$mygraphcap # use private copy
cl> gflush # flush graphics system
cl> flpr 0 # flush process cache
cl> igi device=irafnet < myigi.cmd # run IGI
[/code:1:f7697c5083]You can edit your login.cl file with the line[code:1:f7697c5083]reset graphcap = home$graphcap ; gflush ; flpr 0[/code:1:f7697c5083]before the final 'keep' to make the changes more permanent.Note the graphcap path is an easier way to reproduce lots of plots and means you won't need to edit the individual igi files. I suspect you'll still have questions so post back if I haven't covered everything here. Hope this helps.Cheers,
-Mike
|
Status: offline
Registered: 05/30/2006
Posts: 2
|
Hi Mike,
thanks a lot for the detailed suggestions, which I've tried out.
The hardfonts option, as you noted, is really a partial solution.
Changing the graphcaps file does look more promising.I've posted two example PS files on my website:
http://wise-obs.tau.ac.il/~dani/psplot1.ps This is the output with the standard
igi graphcap file and device=eps; and
http://wise-obs.tau.ac.il/~dani/psplot.ps with your modified graphcap and
device=psplotThey were created with the igi script
lwei 2
exp 1.4
box
rel .5 .5
PUTLABEL 5 This is a test 012345The zeros do look better with the modified graphcap. However, at high
magnification it's clear other things look worse. For example, the ends
of some characters look "ruffled", and the dots in the i's and the decimal
points have a pixelated X shape with a hole in the middle. Is this
what you get too, or is it specific to my system? I've tried
playing with some of the graphcap parameters in order to improve this,
but with no success.
I wonder if you may have any further tips, though I am getting the sense
that there won't be an ideal solution to this problem within igi.
Thanks again
Dan
|