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=name]    [bg‐
16       color=name]      [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=name
57           Text color
58           Either a standard color name or R:G:B triplet
59           Default: gray
60
61       bgcolor=name
62           Text background color
63           Either a standard color name, R:G:B triplet, or "none"
64           Default: none
65
66       rotation=float
67           Rotation angle in degrees (counter-clockwise)
68           Default: 0
69
70       linespacing=float
71           Line spacing
72           Default: 1.25
73
74       at=x,y
75           Screen position at which text will begin to be  drawn  (percentage,
76           [0,0] is lower left)
77
78       line=integer
79           The screen line number on which text will begin to be drawn
80           Options: 1-1000
81
82       align=string
83           Text alignment
84           Options: ll, lc, lr, cl, cc, cr, ul, uc, ur
85           Default: ll
86
87       font=string
88           Font name
89
90       size=float
91           Height of letters in percentage of available frame height
92           Options: 0-100
93           Default: 5
94
95       path=name
96           Path to font file
97
98       charset=string
99           Text encoding (only applicable to TrueType fonts)
100

DESCRIPTION

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

EXAMPLE

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

NOTES

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

SEE ALSO

160        d.font, d.title, d.labels
161

AUTHORS

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

SOURCE CODE

169       Available at: d.text source code (history)
170
171       Accessed: Saturday Oct 28 18:17:17 2023
172
173       Main index | Display index | Topics index | Keywords index |  Graphical
174       index | Full index
175
176       © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
177
178
179
180GRASS 8.3.1                                                          d.text(1)
Impressum