NAME

d.text.freetype - Draws text in the graphics monitor's active display frame using TrueType fonts
(GRASS Display Program)

SYNOPSIS

d.text.freetype
d.text.freetype help
d.text.freetype [-rpsc] [text="string"] [east_north=easting,northing] [font=name] [path=name] [charset=name] [color=name] [size=value] [align=name] [rotation=value]

DESCRIPTION

d.text.freetype draws text in the graphics monitor's active display frame using TrueType fonts already installed on the user's system.

Flags:

-r
Use radians instead of degrees for rotation
-p
Use pixel coordinates ([0,0] is top left)
-s
Font size is height in pixels
-c
Command mode (Compatibility with d.text)

Parameters:

text=string
Text to be displayed. Enclose multiple words "in quotes".
east_north=easting,northing
Locates the text at these map coordinates. 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.
path=/path/filename.ttf
Specifies a TrueType font with full pathname.
charset=name
Sets character encoding for input text. (e.g. ISO-8859-1)
color=name
Sets text color to name. It can also be a hexadecimal value of 0xRRGGBB.
Options: red, orange, yellow, green, blue, indigo, violet, gray, white, and black
Default: 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, ur
l?: Lower, c?: Vertically Centered, u?: Upper,
?l: Left, ?c: Horizontally Centered, ?r: Right
Default: ll  (Lower Left)
rotation=value
Rotates text counterclockwise. The default unit is degrees.
Default: 0

Command mode:

Key

{REQUIRED}
[OPTIONAL]
THIS|orTHAT
+, -
Relative value
r, %, p
Radian, Percentage, and Pixels respectively

Commands

.F {font|path}[:charset] font
.C {color_name|0xRRGGBB} color
.S [+|-]size[p] size
.A {ll|lc|lr|cl|cc|cr|ul|uc|ur} align
.R [+|-]rotation[r] rotation
.X [+|-]x[%|p] x-coord
.Y [+|-]y[%|p] y-coord
.L {0|1} linefeed
.E [+|-]east[%|p] x-origin
.N [+|-]north[%|p] y-origin
.. dot
To end input, press Ctrl-d on a blank line.

EXAMPLES

Standard mode:

d.text.freetype text="GRASS GIS" east_north=2107055,5603133 \
size=7 path=/usr/X11R6/lib/X11/fonts/TTF/luximb.ttf

Command mode:

The following example prints three lines: "GRASS d.text.freetype output", "See test.input file", and "for more details.".
d.text.freetype -c
.F /usr/X11R6/lib/X11/fonts/TTF/luximb.ttf:ISO-8859-1
.S 20p
.L 0
GRASS
.C red
d.text.freetype
.C gray
output
.L 1
See test.input file
for more details.

Command mode instructions may also be read directly from a text file:

d.text.freetype -c < test.input

DEFINITION FILE

To help users select fonts conveniently, the definition file, $(GISBASE)/etc/freetypecap, is provided. Its format is as follows:
	font:fontpath:charset:color:size:description
	*default_font:fontpath:charset:color:size:description
See the file for examples.

SEE ALSO

d.text
d.font
d.title
show.fonts.sh
d.where
parser

AUTHOR

Huidae Cho <grass@geni.cemtlo.com>

Last changed: $Date$