-
Notifications
You must be signed in to change notification settings - Fork 1
Granny Strings
Jeremy Faden edited this page Oct 13, 2021
·
24 revisions
"Granny Strings" are from IDL are supported, so !A will move the pen up, and !N will return to its original level. Over the years support for additional controls has been added, namely some support for HTML, like <br>, and LaTeX is planned.
Color control strings are added which can modify the graphics context. And beyond that, Java/Jython codes can be plugged in which allows any customization.
Code | Description |
---|---|
!A | shift up one half line |
!B | shift down one half line (e.g. !A3!n-!B4!n is 3/4). |
!C | newline |
!D | subscript 0.62 of old font size. |
!U | superscript of 0.62 of old font size. |
!E | superscript 0.44 of old font size. |
!I | subscript 0.44 of old font size. |
!N | return to the original font size. |
!R | restore position to last saved position |
!S | save the current position. |
!K | reduce the font size. (Not in IDL's set.) |
!! | the exclamation point (!) |
!(ext;args) | extension and arguments for the extension, examples follow. |
!(color;saddleBrown) | switch to color. |
!(painter;codeId;codeArg1) | Plug-in Java code for painting regions. |
<br> | newline (see also !c) |
<b> | bold, </b> returns. |
<i> | italics, </i> returns. |
A table of example control strings and their rendering follows.
Label Text | codes used | Rendering |
---|---|---|
cm!A2 | !A is shift up | ![]() |
cm!A2!nSM!BX!n | !n is return, !B is shift down | ![]() |
Bulk!cFlow | !c is newline | ![]() |
Bulk<br>Flow | <br> is also newline | ![]() |
Flow !(color;blue)Positive!(color) !(color;red)Negative!(color) | colors, note no argument returns to default color |
![]() |
!(color;SaddleBrown)█!(color) Brown Points | Unicode block used, to show color SVG Colors |
![]() |
ΔM Parameter | HTML Entities Table | ![]() |
☎ 555-1212 | HTML Entities | ![]() |
some <b>Bold</b> text | Bold text | ![]() |
See also https://github.com/das-developers/das2java/wiki/Granny-Text-Strings.