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

Home » Public Forums » archive » Re: Mac OS x IDL font handling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Mac OS x IDL font handling [message #55250] Thu, 09 August 2007 10:05
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 08 Aug 2007 17:25:41 +0000, clivecook59 wrote:

> HI,
>
> I am still pretty new with running IDL within the Mac operating system
> and am having some problems with understanding the way in which fonts
> work. I only have a basic understanding on UNIX, so i think that this
> is my problem. So my question would be how do i plot a graph using for
> example a Times new roman font. In windows idl i set font =0 and then
> device,set_font="times new roman*bold*20" for example and it is easy
> to adjust the font size or whether or not its bold, italic or normal.
> Now on the Mac i am completely confused. the device fonts available to
> idl all have long seemingly complicated names eg ...-adobe-helvetica-
> bold-o-normal--18-180-75-80-p-103-iso8859-1
>
> Any help would be greatly appreciated.

You can use '*' as a wildcard, and then ask DEVICE for all matching
fonts. Here I select the first (optionally) bold, italic, courier font
of the requested point size:

if keyword_set(b) then b='bold' else b='medium'
if keyword_set(i) then i='i' else i='r'
if ~keyword_set(sz) then sz=12
device,get_fontnames=df,font='*cour*'+b+'-'+i+'-normal*--'+ $
strtrim(sz,2)+'*'
dispfont=df[0]

Seeing all the fonts:

device,get_fontnames=df,font='*'

is instructive as well. You specific request would probably read:

device,get_fontnames=times,font='*times*bold-r-normal*--20*'

JD
Re: Mac OS x IDL font handling [message #55263 is a reply to message #55250] Wed, 08 August 2007 15:23 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
clivecoo...@gmail.com wrote:
> HI,
>
> I am still pretty new with running IDL within the Mac operating system
> and am having some problems with understanding the way in which fonts
> work. I only have a basic understanding on UNIX, so i think that this
> is my problem. So my question would be how do i plot a graph using for
> example a Times new roman font. In windows idl i set font =0 and then
> device,set_font="times new roman*bold*20" for example and it is easy
> to adjust the font size or whether or not its bold, italic or normal.
> Now on the Mac i am completely confused. the device fonts available to
> idl all have long seemingly complicated names eg ...-adobe-helvetica-
> bold-o-normal--18-180-75-80-p-103-iso8859-1

That looks like the same font naming conventions used on conventional
unix platforms. Is there an xfontsel utility available on the Mac? I
found playing around with that utility was very useful on Linux and
Irix machines for helping me understand what those conventions mean.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Thinning algorithm without for loops
Next Topic: Re: Assimilating three files considering their DOY and overpassing time

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

Current Time: Wed Oct 08 13:52:24 PDT 2025

Total time taken to generate the page: 0.00511 seconds