NAME
d.text.freetype - Draws text in the active display frame on the graphics monitor using TrueType fonts.
(GRASS Display Program)
SYNOPSIS
d.text.freetype
d.text.freetype help
d.text.freetype
[-rpsc]
[text=name]
[east_north=east,north]
[font=name]
[path=name]
[charset=name]
[color=name]
[size=value]
[align=name]
[rotation=value]
DESCRIPTION
d.text.freetype draws text in the active display frame on
the graphics monitor using TrueType fonts.
Flags:
- -r
- Radian rotation
- -p
- Pixel coordinates
- -s
- Pixel size
- -c
- Command mode (Compatibility with d.text)
Parameters:
- text=name
- Text to be displayed.
- east_north=east,north
- Locates text at this point.
The user can click on the location instead of using this option.
- font=name
- Specifies a font with a fontname in the definition file, freetypecap.
- path=name
- Specifies a font with full pathname.
- charset=name
- Sets character encoding for input text.
- color=name
- Sets text color to name.
Options: red, orange, yellow, green, blue, indigo,
violet, gray, white, and black
Default: gray
It can also be a hexadecimal value of 0xRRGGBB.
- size=value
- Sets text height in percent of available frame height.
Default: 30
- align=name
- Aligns text in this way.
Options: ll, lc, lr, cl, cc, cr, ul, uc, ur
Default: ll
l?: Lower, c?: Vertically Centered, u?: Upper,
?l: Left, ?c: Horizontally Centered, ?r: Right
- rotation=value
- Rotates text counterclockwise.
Default: 0
The default unit is degree.
Command mode:
Note
- {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
-
Example
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/TrueType/ttf1.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.
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
parser
AUTHOR
Huidae Cho
<grass@geni.cemtlo.com>
Last changed: $Date: 2002/06/07 02:08:26 $