1d.text(1)                   GRASS GIS User's Manual                  d.text(1)
2
3
4

NAME

6       d.text   - Draws text in the active display frame on the graphics moni‐
7       tor using the current font.
8

KEYWORDS

10       display, cartography
11

SYNOPSIS

13       d.text
14       d.text --help
15       d.text [-pgbrs]  [text=string]   [input=name]    [color=string]    [bg‐
16       color=string]     [rotation=float]     [linespacing=float]     [at=x,y]
17       [line=integer]      [align=string]      [font=string]      [size=float]
18       [path=name]     [charset=string]     [--help]   [--verbose]   [--quiet]
19       [--ui]
20
21   Flags:
22       -p
23           Screen position in pixels ([0,0] is top left)
24
25       -g
26           Screen position in geographic coordinates
27
28       -b
29           Use bold text
30
31       -r
32           Use radians instead of degrees for rotation
33
34       -s
35           Font size is height in pixels
36
37       --help
38           Print usage summary
39
40       --verbose
41           Verbose module output
42
43       --quiet
44           Quiet module output
45
46       --ui
47           Force launching GUI dialog
48
49   Parameters:
50       text=string
51           Text to display
52
53       input=name
54           Input file
55
56       color=string
57           Text color, either a standard GRASS color or R:G:B triplet
58           Default: gray
59
60       bgcolor=string
61           Text background color, either a standard GRASS color or R:G:B trip‐
62           let
63
64       rotation=float
65           Rotation angle in degrees (counter-clockwise)
66           Default: 0
67
68       linespacing=float
69           Line spacing
70           Default: 1.25
71
72       at=x,y
73           Screen  position  at which text will begin to be drawn (percentage,
74           [0,0] is lower left)
75
76       line=integer
77           The screen line number on which text will begin to be drawn
78           Options: 1-1000
79
80       align=string
81           Text alignment
82           Options: ll, lc, lr, cl, cc, cr, ul, uc, ur
83           Default: ll
84
85       font=string
86           Font name
87
88       size=float
89           Height of letters in percentage of available frame height
90           Options: 0-100
91           Default: 5
92
93       path=name
94           Path to font file
95
96       charset=string
97           Text encoding (only applicable to TrueType fonts)
98

DESCRIPTION

100       d.text draws text in the active display frame on the graphics  monitor.
101       Text  can  be provided through standard input or redirected from a file
102       (using the UNIX redirection mechanism).  In  addition  to  the  options
103       provided  on  the  command line, colors, text size, font type, rotation
104       angle, and boldness can be adjusted with commands in the standard input
105       (i.e.,  if the user invokes d.text without options on the command line,
106       and then assigns values to these options on lines within  the  standard
107       input).
108
109   Commands:
110       .C color
111           (where  color is one of the available colors) causes text appearing
112           on subsequent lines to be drawn in that color.
113
114       .G color
115           (where color is one of the available colors) causes the  background
116           of text appearing on subsequent lines to be drawn in that color.
117
118       .S  size
119           (where size is a percentage within the range 0 to 100) adjusts text
120           size.  Note that a size of 10 would allow 10 lines to be  drawn  in
121           the  active  display  frame, 5 would allow the drawing of 20 lines,
122           and 50 would allow the drawing of 2 lines.
123
124       .F font
125           (where font is one of the fonts known by the GRASS program  d.font)
126           manipulates  the font type. Available fonts are listed in the GRASS
127           manual entry for d.font.  The default font type used  (if  unspeci‐
128           fied by the user) is romans.
129
130       .R  rotation
131           (where  rotation  is an angle in degrees, counter-clockwise) to ro‐
132           tate the text.
133
134       .B 1
135           stipulates that following text be printed in  bold.   This  command
136           means bold on.
137
138       .B 0
139           turns bold off of all text appearing on lines beneath it. (Bold off
140           is used by default, if unspecified by the user.)
141

EXAMPLE

143       The following command will print the short phrase "This is  a  test  of
144       d.text"  in  the  active display frame using the color yellow, in bold,
145       and using 4/100’ths (4%) of the active frame’s vertical space per line:
146
147       d.text text="This is a test of d.text" color=yellow bgcolor=gray size=4
148       Displayed Text
149

NOTES

151       Note that the GRASS command d.title creates  map  TITLEs  in  a  format
152       suitable for input to d.text.
153
154       d.text  needs  escape sequences that can be used within lines to change
155       colors, boldness, and perhaps size.
156

SEE ALSO

158        d.font, d.title, d.labels
159

AUTHORS

161       James Westervelt, U.S. Army Construction Engineering  Research  Labora‐
162       tory
163
164       Updates by Huidae Cho
165

SOURCE CODE

167       Available at: d.text source code (history)
168
169       Accessed: Mon Jun 20 16:45:48 2022
170
171       Main  index | Display index | Topics index | Keywords index | Graphical
172       index | Full index
173
174       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
175
176
177
178GRASS 8.2.0                                                          d.text(1)
Impressum