1d.text.freetype(1) Grass User's Manual d.text.freetype(1)
2
3
4
6 d.text.freetype - Draws text in the graphics monitor's active display
7 frame using TrueType fonts.
8
10 display
11
13 d.text.freetype
14 d.text.freetype help
15 d.text.freetype [-brpnsc] [text=string] [east_north=east,north]
16 [path=string] [charset=string] [color=string] [size=float]
17 [align=string] [rotation=float] [linespacing=float]
18
19 Flags:
20 -b Use bold text
21
22 -r Use radians instead of degrees for rotation
23
24 -p Coordinates are in pixels ([0,0] is top left)
25
26 -n Coordinates are percentage of frame ([0,0] is bottom left)
27
28 -s Font size is height in pixels
29
30 -c Command mode (Compatibility with d.text)
31
32 Parameters:
33 text=string
34 Text to display
35
36 east_north=east,north
37 Map coordinates
38
39 path=string
40 Path to TrueType font (including file name)
41
42 charset=string
43 Character encoding (default: UTF-8)
44
45 color=string
46 Text color, either a standard GRASS color or R:G:B triplet Default:
47 gray
48
49 size=float
50 Height of letters (in percent of available frame height) Default: 5
51
52 align=string
53 Text alignment Options: ll,lc,lr,cl,cc,cr,ul,uc,ur Default: ll
54
55 rotation=float
56 Rotation angle in degrees (counter-clockwise) Default: 0
57
58 linespacing=float
59 Line spacing Default: 1.1
60
62 d.text.freetype draws text in the graphics monitor's active display
63 frame using TrueType fonts already installed on the user's system.
64
65 Parameter Notes:
66 east_north=easting,northing
67 Locates the text at these map coordinates. If this option is
68 omitted, the user will be prompted to use the mouse to specify
69 the location.
70
71 font=name
72 Specifies a font listed in the GRASS 'freetypecap' definition
73 file.
74
75 charset=name
76 Sets character encoding for input text. (e.g. ISO-8859-1)
77
78 color=name
79 Sets text color to name or R:G:B triplet. It can also be a
80 hexadecimal value of 0xRRGGBB (deprecated).
81 Options: red, orange, yellow, green, blue, indigo, violet, gray,
82 white, and black
83 Default: gray
84
85 size=value
86 Sets text height in percent of available frame height.
87 Default: 10
88
89 align=name
90 Aligns text in this way.
91 Options: ll, lc, lr, cl, cc, cr, ul, uc, ur
92 l?: Lower, c?: Vertically Centered, u?: Upper,
93 ?l: Left, ?c: Horizontally Centered, ?r: Right
94 Default: ll (Lower Left)
95
96 Command mode:
97 Key
98 {REQUIRED}
99
100 [OPTIONAL]
101
102 THIS|orTHAT
103
104 +, - Relative value
105
106 r, %, p
107 Radian, Percentage, and Pixels respectively
108
109 Commands
110 .F {font|path}[:charset] font
111
112 .C {color_name|R:G:B} color (default: gray)
113
114 .S [+|-]size[p] size (default: 5)
115
116 .B {0|1} bold (default: 0)
117
118 .A {ll|lc|lr|cl|cc|cr|ul|uc|ur} align (default: ll)
119
120 .R [+|-]rotation[r] rotation (default: 0)
121
122 .I linespacing linespacing (default: 1.1)
123
124 .X [+|-]x[%|p] x-coord
125
126 .Y [+|-]y[%|p] y-coord
127
128 .L {0|1} linefeed (default: 1)
129
130 .E [+|-]east[%|p] x-origin
131
132 .N [+|-]north[%|p] y-origin
133
134 .. dot
135
136 To end input, press Ctrl-d on a blank line.
137
139 Standard mode:
140 d.text.freetype text="GRASS GIS" east_north=2107055,5603133 \
141 size=7 path=/usr/X11R6/lib/X11/fonts/TTF/luximb.ttf
142
143 Command mode:
144 The following example prints three lines: "GRASS d.text.freetype out‐
145 put", "See test.input file", and "for more details.".
146
147 d.text.freetype -c
148 .L 0 GRASS d.text.freetype output See test.input file for more
149 details.
150
151 Command mode instructions may also be read directly from a text file:
152 d.text.freetype -c < test.input
153
155 To help users select fonts conveniently, the definition file, $(GIS‐
156 BASE)/etc/freetypecap, is provided. Its format is as follows:
157 font:fontpath:charset:description
158 *default_font:fontpath:charset:description
159 See the file for examples.
160
162 d.text
163 d.font.freetype
164 d.font
165 d.title
166 d.where
167
169 Huidae Cho grass4u@gmail.com>
170
171 Updates by Hamish Bowman, NZ
172
173 Last changed: $Date: 2006/09/02 07:42:21 $
174
175 Full index
176
177
178
179GRASS 6.2.2 d.text.freetype(1)