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

Home » Public Forums » archive » Re: Using device fonts in object graphics ?
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: Using device fonts in object graphics ? [message #82611] Thu, 03 January 2013 10:23
George.millward is currently offline  George.millward
Messages: 26
Registered: October 2012
Junior Member
On Thursday, January 3, 2013 11:10:16 AM UTC-7, David Fanning wrote:
> David Fanning writes:
>
>
>
>> As far as I know, you can use any true-type font you have
>
>> installed on your machine:
>
>>
>
>> Device, TT_FONT=1, SET_FONT='WhatEverYouHave'
>
>
>
> I guess in object graphics you assign the font name
>
> with an IDLgrFont object.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

David,

Yeh, I figured it out.

First you list your available fonts:

DEVICE, GET_FONTNAMES=fnames, SET_FONT='*'
FOREACH element, fnames DO PRINT, 'Value = @', element,'@'

then you set one up, ie:

main_text_font = Obj_New('IDLgrFont', 'Franklin Gothic Demi', Size=10)

Seems to work !!

Thanks for your help.

George.
Re: Using device fonts in object graphics ? [message #82612 is a reply to message #82611] Thu, 03 January 2013 10:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> As far as I know, you can use any true-type font you have
> installed on your machine:
>
> Device, TT_FONT=1, SET_FONT='WhatEverYouHave'

I guess in object graphics you assign the font name
with an IDLgrFont object.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Using device fonts in object graphics ? [message #82613 is a reply to message #82612] Thu, 03 January 2013 10:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George.millward@yahoo.com writes:

> Hmm - but doesn't that mean that object graphics only has access to Times,
> Helvetica and Courier ?

As far as I know, you can use any true-type font you have
installed on your machine:

Device, TT_FONT=1, SET_FONT='WhatEverYouHave'

There is no guarantee someone who uses your program will have
this font, however, so if we write code that is distributed,
we usually restrict ourselves to fonts distributed with IDL.
I've been using the DejaVuSans font quite a lot lately. I
like it for most things. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Using device fonts in object graphics ? [message #82614 is a reply to message #82613] Thu, 03 January 2013 09:59 Go to previous message
George.millward is currently offline  George.millward
Messages: 26
Registered: October 2012
Junior Member
On Thursday, January 3, 2013 10:50:14 AM UTC-7, george....@yahoo.com wrote:
> On Thursday, January 3, 2013 10:44:22 AM UTC-7, David Fanning wrote:
>
>> George.millward@yahoo.com writes:
>
>>
>
>>
>
>>
>
>>> I'm trying to load and use 'device' fonts in IDL object graphics.
>
>>
>
>>> All I find in the documentation are references to direct graphics.
>
>>
>
>>>
>
>>
>
>>> in direct graphics all you do is set !p.font = 0 and get on with it.
>
>>
>
>>>
>
>>
>
>>> Anyone know how to use device fonts in object graphics ?
>
>>
>
>>>
>
>>
>
>>> I'm fearing the lack of documentation means that it can't be done.
>
>>
>
>>
>
>>
>
>> I've never heard of this being done. The object graphics system
>
>>
>
>> is really set up to use True-type fonts.
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> David
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> --
>
>>
>
>> David Fanning, Ph.D.
>
>>
>
>> Fanning Software Consulting, Inc.
>
>>
>
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
>>
>
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
>
>
> David,
>
>
>
> Hmm - but doesn't that mean that object graphics only has access to Times,
>
> Helvetica and Courier ?
>
>
>
> Cheers
>
>
>
> George.

oh, hang on - now I see you can add true-type fonts:

http://www.exelisvis.com/docs/Using_TrueType_Fonts.html

G.
Re: Using device fonts in object graphics ? [message #82615 is a reply to message #82614] Thu, 03 January 2013 09:50 Go to previous message
George.millward is currently offline  George.millward
Messages: 26
Registered: October 2012
Junior Member
On Thursday, January 3, 2013 10:44:22 AM UTC-7, David Fanning wrote:
> George.millward@yahoo.com writes:
>
>
>
>> I'm trying to load and use 'device' fonts in IDL object graphics.
>
>> All I find in the documentation are references to direct graphics.
>
>>
>
>> in direct graphics all you do is set !p.font = 0 and get on with it.
>
>>
>
>> Anyone know how to use device fonts in object graphics ?
>
>>
>
>> I'm fearing the lack of documentation means that it can't be done.
>
>
>
> I've never heard of this being done. The object graphics system
>
> is really set up to use True-type fonts.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

David,

Hmm - but doesn't that mean that object graphics only has access to Times,
Helvetica and Courier ?

Cheers

George.
Re: Using device fonts in object graphics ? [message #82616 is a reply to message #82615] Thu, 03 January 2013 09:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George.millward@yahoo.com writes:

> I'm trying to load and use 'device' fonts in IDL object graphics.
> All I find in the documentation are references to direct graphics.
>
> in direct graphics all you do is set !p.font = 0 and get on with it.
>
> Anyone know how to use device fonts in object graphics ?
>
> I'm fearing the lack of documentation means that it can't be done.

I've never heard of this being done. The object graphics system
is really set up to use True-type fonts.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using device fonts in object graphics ?
Next Topic: Was a file opened with /Swap_if_little_endian ?

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

Current Time: Wed Oct 08 18:39:05 PDT 2025

Total time taken to generate the page: 0.00669 seconds