Re: FONT setting [message #32934] |
Tue, 19 November 2002 18:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
tom (tom2959@21cn.com) writes:
> How to use other type of TTF? I have many TTF on my computer which can be
> used in MS WORD. Would you please insert code in the following if I want to
> use TTF named ABC.ttf?
>
> Pro test
> set_plot,'ps'
> set_plot,'win'
> !p.font=1
> plot,x,y,xtitle='TEST TTF'
> end
Well, I have a Batang True-Type font on my machine.
To see this plot in Batang, I would do this:
Pro test
thisDevice = !D.Name
set_plot,'ps'
device, set_font='batang', /tt_font
!p.font=1
plot,findgen(11),xtitle='TEST TTF', $
position=[0.1,0.2, 0.9, 0.9], charsize=2.5
if !d.name EQ 'PS' then device, /close_file
set_plot, thisDevice
end
>> For everything but the most demanding journal output,
>> I usually go with the good ol' Helvetica hardware
>> fonts. :-)
>
> When I set font=0 the two figure looks quit different. For example,
> !p.font=0
> plot,x,y,title='dfdjhfdjhfjghfjghfjghfgfjghfjgfghfjgfgfhfguf gju'
> end
> In win figure, the title is much shorter than that in PS. How to change it?
I didn't say they were "the same". It think I said they were "similar".
Obviously Helvetica is not the same as Hershey Simplex Roman.
> Sometimes there are many text in the figure, when I use xyouts to put them
> in the correct position in WIN, they are not on the correct position in PS.
Typically, we use normalized coordinates when we place
text on plots that we want to display in a window and on
a PostScript page. That gets things in roughly the correct
position. Sometimes you have to fiddle around a bit. If you
want presentation quality graphics buy Correl Draw, not IDL. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|