table of contents
| d.text.freetype(1grass) | Grass User's Manual | d.text.freetype(1grass) |
NAME¶
d.text - Draws text in the active display frame on the graphics monitor using the current font.KEYWORDS¶
display, cartographySYNOPSIS¶
d.textFlags:¶
- -m
-
Use mouse to interactively place text
- -p
-
Screen position in pixels ([0,0] is top left)
- -g
-
Screen position in geographic coordinates
- -b
-
Use bold text
- -r
-
Use radians instead of degrees for rotation
- -s
-
Font size is height in pixels
- -c
-
Ignored (compatibility with d.text.freetype)
- --verbose
-
Verbose module output
- --quiet
-
Quiet module output
Parameters:¶
- text=string
-
Text to display
- size=float
-
Height of letters in percentage of available frame heightOptions: 0-100Default: 5
- color=string
-
Text color, either a standard GRASS color or R:G:B tripletDefault: gray
- bgcolor=string
-
Text background color, either a standard GRASS color or R:G:B triplet
- line=integer
-
The screen line number on which text will begin to be drawnOptions: 1-1000
- at=x,y
-
Screen position at which text will begin to be drawn (percentage, [0,0] is lower left)
- align=string
-
Text alignmentOptions: ll,lc,lr,cl,cc,cr,ul,uc,urDefault: ll
- rotation=float
-
Rotation angle in degrees (counter-clockwise)Default: 0
- linespacing=float
-
Line spacingDefault: 1.25
- font=string
-
Font name
- path=string
-
Path to font file
- charset=string
-
Text encoding (only applicable to TrueType fonts)
DESCRIPTION¶
d.text.freetype draws text in the graphics monitor's active display frame using TrueType fonts already installed on the user's system.Parameter Notes:¶
- at=x,y
-
Locates the text at this screen position (percentage, [0,0] is bottom left). If this option is omitted, the user will be prompted to use the mouse to specify the location.
- font=name
-
Specifies a font listed in the GRASS 'freetypecap' definition file.
- charset=name
-
Sets character encoding for input text. (e.g. ISO-8859-1)
- color=name
-
Sets text color to name or R:G:B triplet. It can also be a hexadecimal value of 0xRRGGBB (deprecated).Options: red, orange, yellow, green, blue, indigo, violet, gray, white, and blackDefault: gray
- size=value
-
Sets text height in percent of available frame height.Default: 10
- align=name
-
Aligns text in this way.Options: ll, lc, lr, cl, cc, cr, ul, uc, url?: Lower, c?: Vertically Centered, u?: Upper,?l: Left, ?c: Horizontally Centered, ?r: RightDefault: ll (Lower Left)
Command mode:¶
Key¶
- {REQUIRED}
- [OPTIONAL]
- THIS|orTHAT
- +, -
-
Relative value
- r, %, p
-
Radian, Percentage, and Pixels respectively
Commands¶
-
{0|1} bold (default: 0)
-
[+|-]rotation[r] rotation (default: 0)
-
linespacing linespacing (default: 1.1)
EXAMPLES¶
Standard mode:¶
d.text.freetype text="GRASS GIS" -g at=2107055,5603133 \Command mode:¶
The following example prints three lines: "GRASS d.text.freetype output", "See test.input file", and "for more details.".d.text.freetype
output
DEFINITION FILE¶
To help users select fonts conveniently, the definition file, $(GISBASE)/etc/freetypecap, is provided. Its format is as follows:SEE ALSO¶
d.textAUTHOR¶
Huidae Cho grass4u@gmail.com> Updates by Hamish Bowman, NZ Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $ Full index © 2003-2011 GRASS Development Team| GRASS 6.4.2 |