comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Vector-drawn fonts on an SGI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Vector-drawn fonts on an SGI [message #8650] Fri, 11 April 1997 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Charles Cavanaugh wrote:
> I have some IDL widget-based applications that I developed on an
> SGI Indigo 2 Impact 10000, running IRIX 6.2. The applications
> look good when I use a Linux box, Mac or HP as a front end to the
> SGI, but when I sit down at the SGI and run the applications, the
> fonts in the widgets and graphics windows are way too huge and the
> colors in the graphics windows are terrible. I found a way to
> tame the colors (adding some lines to .Xdefaults), but I cannot
> find a way to control the fonts. Does anyone know how to ensure
> vector-drawn fonts look good (and similar) across different X11
> servers?

Funny you should ask. I posted an inquiry about this last week. The fix
I came up with goes as follows. Put the following commands in an IDL
startup file (they must be executed immediately after IDL startup):

device,retain=2,pseudo=8 ; 8 bit display with backing store
window,/free,/pixmap,colors=-5 ; Create window to allocate colors
plot,[0] ; Might not be needed, but won't hurt
wdelete,!d.window ; Delete the window
device,set_character_size=[6,9] ; Set the vector font size
print, 'Number of colors allocated is ', !d.n_colors

If you use this in your startup file, then you should not need any
entries in your $HOME/.Xdefaults file. The only command I have in
$HOME/.Xdefaults is

Idl*fontlist: screen16

which sets the font used for widgets (unrelated to the graphics vector
font).

As RSI technical support explained it to me, the default graphics vector
font size is 6x9 at startup. However as soon as you open a graphics
window, that font size may be changed (why, I don't know). So the only
way to guarantee that you get 6x9 vector fonts is to use the commands
above immediately after startup. Please note that you are not guaranteed
to get 256 colors allocated to IDL 4.01 if you use the colors=-5 keyword
(I usually get about 170 colors on my SGI). On SGI boxes with 24 bit
graphics, setting colors=256 usually gets you 256 colors, but this won't
work on all Unix boxes. The IDL 5.0 pre-release seems to be a bit
smarter (at least on an SGI), and even if you set colors=-5, it
allocates 256 colors.

I would really like to see this Q/A added to the FAQ.

Cheers,
Liam.
[Message index]
 
Read Message
Previous Topic: Re: mswindows postmessage loops?
Next Topic: Re: online visualisation with pv-wave 6.02

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 05:37:51 PDT 2025

Total time taken to generate the page: 0.64527 seconds