d.text
GRASS Reference Manual
d.text NAME d.text - Draws text in the active display frame on the graphics monitor. (GRASS Display Program) SYNOPSIS d.text d.text help d.text [size=value] [color=name] [line=value] DESCRIPTION d.text draws text in the active display frame on the graphics monitor. Text can be provided through standard input or redirected from a file (using the UNIX redirection mechanism). Parameters: size=value Height of letters, stated as a percent of the available display frame height. Options: 0 - 100 Default: 5 color=name Sets display text color to name. Options: red, orange, yellow, green, blue, indigo, violet, gray, white, and black Default: gray line=value The screen line number on which the first line of text will be drawn. (Line 1 is at the top of the active display frame.) Options: 1 - 1000 Default: 1 In addition to the options provided on the command line, colors, text size, font type, and boldness, can be adjusted with commands in the standard input (i.e., if the user invokes d.text without options on the command line, and then assigns values to these options on lines within the standard input). In this case, the user also sees the standard GRASS parser interface described in the manual entry for parser. Commands: .C color (where color is one of the available colors) causes text appearing on subsequent lines to be drawn in that color. Text size can be adjusted with the command: .S size GRASS 5.0beta6 GRASS Development Team 1 d.text
GRASS Reference Manual
d.text (where size is a percentage within the range 0 to 100). Note that a size of 10 would allow 10 lines to be drawn in the active display frame, 5 would allow the drawing of 20 lines, and 50 would allow the drawing of 2 lines. Font type can be manipulated using the command: .F font (where font is one of the fonts known by the GRASS program d.font). Available fonts are listed in the GRASS manual entry for d.font. The default font type used (if unspecified by the user) is romans. Run the GRASS macro show.fonts.sh to see what these fonts look like. The user can also stipulate that text be printed in bold on lines beneath the command: .B 1 This command means bold on . Similarly, the command: .B 0 turns bold off of all text appearing on lines beneath it. (Bold off is used by default, if unspecified by the user.) EXAMPLE The following command will print the short phrase "This is a test of d.text" in the active display frame using the color yellow, in bold, and using 4/100'ths (4%) of the active frame's vertical space per line: d.text .C yellow .S 4 .B 1 This is a test of d.text The user presses control-d (the "ctrl" and "d" keys) to end input to d.text. NOTES Note that the GRASS command d.title creates map titles in a format suitable for input to d.text. d.text needs escape sequences that can be used within lines to change colors, boldness, and perhaps size. SEE ALSO d.font, d.title, show.fonts.sh, and parser AUTHOR James Westervelt, U.S. Army Construction Engineering Research Laboratory 2 GRASS Development Team GRASS 5.0beta6