Q: Scientific notation in Obj. graphics [message #18712] |
Wed, 02 February 2000 00:00  |
Mirko Vukovic
Messages: 124 Registered: January 1996
|
Senior Member |
|
|
In direct graphics I use textoidl and Hershey fonts
for dealing with greek characters, subscripts and superscripts.
What is the best way to deal with that in object graphics?
I'm under the impression that in OG I have to declare a font,
for example Hershey 4 and use it for a text object. But how
do I mix different Hershey fonts?
thanks,
Mirko
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|
Re: Q: Scientific notation in Obj. graphics [message #18777 is a reply to message #18712] |
Mon, 07 February 2000 00:00  |
Mirko Vukovic
Messages: 124 Registered: January 1996
|
Senior Member |
|
|
In article <949868028.999057@clam-55>,
"Mark Hadfield" <m.hadfield@niwa.cri.nz> wrote:
> David Fanning <davidf@dfanning.com> wrote in message
> news:MPG.1306826917b80ccc989a0e@news.frii.com...
>> Mirko Vukovic (mvukovic@taz.telusa.com) writes:
>>
>>> In direct graphics I use textoidl and Hershey fonts
>>> for dealing with greek characters, subscripts and superscripts.
>>>
>>> What is the best way to deal with that in object graphics?
>>>
>>> I'm under the impression that in OG I have to declare a font,
>>> for example Hershey 4 and use it for a text object. But how
>>> do I mix different Hershey fonts?
>>
>> Humm, well, *that's* a good question. You certainly can't
>> use the normal Hershey escape characters, as I just found
>> out to my chagrin. :-(
>
> Well there's the enable_formatting keyword to IDLgrText::Init:
>
> ENABLE_FORMATTING (Get, Set)
>
> Set this keyword to indicate that the text object should honor
> embedded Hershey-style formatting codes within the strings.
> (Formatting codes are described in Fonts.) The default is not
> to honor the formatting codes.
>
> I know that this causes positioning codes like !E and !N to be
recognised
> (with TrueType as well as Hershey Fonts). I've never tried the codes
to
> select different fonts.
The little snippet of code I tried mixed succesfully roman and greek
Hershey fonts.
Makes me very happy.
Thanks a lot guys.
Mirko
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|
Re: Q: Scientific notation in Obj. graphics [message #18788 is a reply to message #18712] |
Mon, 07 February 2000 00:00  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
David Fanning <davidf@dfanning.com> wrote in message
news:MPG.1306826917b80ccc989a0e@news.frii.com...
> Mirko Vukovic (mvukovic@taz.telusa.com) writes:
>
>> In direct graphics I use textoidl and Hershey fonts
>> for dealing with greek characters, subscripts and superscripts.
>>
>> What is the best way to deal with that in object graphics?
>>
>> I'm under the impression that in OG I have to declare a font,
>> for example Hershey 4 and use it for a text object. But how
>> do I mix different Hershey fonts?
>
> Humm, well, *that's* a good question. You certainly can't
> use the normal Hershey escape characters, as I just found
> out to my chagrin. :-(
Well there's the enable_formatting keyword to IDLgrText::Init:
ENABLE_FORMATTING (Get, Set)
Set this keyword to indicate that the text object should honor
embedded Hershey-style formatting codes within the strings.
(Formatting codes are described in Fonts.) The default is not
to honor the formatting codes.
I know that this causes positioning codes like !E and !N to be recognised
(with TrueType as well as Hershey Fonts). I've never tried the codes to
select different fonts.
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|
Re: Q: Scientific notation in Obj. graphics [message #18791 is a reply to message #18712] |
Sun, 06 February 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
I wrote yesterday:
> Mirko Vukovic (mvukovic@taz.telusa.com) writes:
>
>> In direct graphics I use textoidl and Hershey fonts
>> for dealing with greek characters, subscripts and superscripts.
>>
>> What is the best way to deal with that in object graphics?
>>
>> I'm under the impression that in OG I have to declare a font,
>> for example Hershey 4 and use it for a text object. But how
>> do I mix different Hershey fonts?
>
> Humm, well, *that's* a good question. You certainly can't
> use the normal Hershey escape characters, as I just found
> out to my chagrin. :-(
>
> I'll see what I can find out, but in the meantime, let
> us know if you learn something, Mirko.
As the good folks at RSI have let me know, this *would*
have worked had a just set the ENABLE_FORMATTING keyword
on the text object.
So, to do this: use a Font object set up to use Hershey
fonts and be sure you enable embedded formatting codes
by setting the ENABLE_FORMATTING keyword on the text object.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Q: Scientific notation in Obj. graphics [message #18797 is a reply to message #18712] |
Sat, 05 February 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mirko Vukovic (mvukovic@taz.telusa.com) writes:
> In direct graphics I use textoidl and Hershey fonts
> for dealing with greek characters, subscripts and superscripts.
>
> What is the best way to deal with that in object graphics?
>
> I'm under the impression that in OG I have to declare a font,
> for example Hershey 4 and use it for a text object. But how
> do I mix different Hershey fonts?
Humm, well, *that's* a good question. You certainly can't
use the normal Hershey escape characters, as I just found
out to my chagrin. :-(
I'll see what I can find out, but in the meantime, let
us know if you learn something, Mirko.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|