Changing Fonts within a String, special fonts
You can change fonts one or more times within a text string using the embedded font commands shown in the table below. The character following the exclamation mark can be either upper or lower case.
Examples of commands used to change fonts in mid-string are included in Formatting Command Examples.
Table H-33: Embedded Font Selection Commands
Writing Exponents :
IDL> xyouts, 0.5, 200, '!6E=mc!E2' On the plot, the string will reads: E = mc2
Positioning Commands | Action |
!A | Shift above the division line. |
!B | Shift below the divisionline. |
!C | "Carriage return," begins a new line of text. Shift back to the starting position and down one line. |
!D | Shift down to the first level subscript and decrease the character size by a factor of 0.62. |
!E | Shift up to the exponent level and decrease the character size by a factor of 0.44. |
!I | Shift down to the index level and decrease the character size by a factor of 0.44. |
!L | Shift down to the second level subscript. Decrease the character size by a factor of 0.62. |
!N | Shift back to the normal level and original character size. |
!R | Restore position. The current position is set from the top of the saved position stack. |
!S | Save position. The currente position is saved on the top of the saved positions stack. |
!U | Shift to upper subscript level. Decrease the character size by a factor of 0.62. |
!X | Return to the entry font. |
!! | Display the ! symbol. |
To change to special characters: '!9'+string(#B)+'!X'
Look up number from:https://www.harrisgeospatial.com/docs/using_truetype_fonts.html
e.g. for integral sign in title: title='!9'+string(242B)+'!X'Note: use !p.font=0 for post script
Further descripton:http://tinyurl.com/64sv245
Solar mass Sun symbol: 'Mass (M/M'+sunsymbol(font=0)+')'
Overbar on characters:
TITLE='My Data !9`!S``!R!XAB'
Gives an overbar over AB. title='My Data !9`!S``!R!XV!Dr!U2!N!X A'
gives an overbar over Vr^2 leaving out A
No comments:
Post a Comment