d.text(1)
π d.text β bestie, it's giving TEXT ON YOUR SCREEN π
okay so this is a page from the GRASS GIS User's Manual (that's the manual name, mwah) and it's all about d.text, a lil program that β¨draws textβ¨ in the active display frame on your graphics monitor, using whatever font is currently loaded. cartography girlies, this one's for you π
π·οΈ KEYWORDS
display, cartography
β¨ SYNOPSIS β¨
d.text
d.text --help
d.text [-pgbrs] [text=string] [input=name] [color=name]
[bgcolor=name] [rotation=float] [linespacing=float] [at=x,y]
[line=integer] [align=string] [font=string] [size=float]
[path=name] [charset=string] [--help] [--verbose] [--quiet]
[--ui]
π© Flags
-pβ screen position in pixels (and heads up:[0,0]is the top left, not the bottom left, we're doing screen coords here bestie)-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--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π Parameters
text=stringβ text to displayinput=nameβ input filecolor=nameβ text color. either a standard color name or anR:G:Btriplet. default:graybgcolor=nameβ text background color. either a standard color name, anR:G:Btriplet, or"none". default:nonerotation=floatβ rotation angle in degrees (counter-clockwise). default:0linespacing=floatβ line spacing. default:1.25at=x,yβ screen position at which text will begin to be drawn (percentage, and[0,0]is lower left here, yes it's different from-p, don't @ me). options:0-100line=integerβ the screen line number on which text will begin to be drawn. options:1-1000align=stringβ text alignment. options:ll,lc,lr,cl,cc,cr,ul,uc,ur. default:llfont=stringβ font namesize=floatβ height of letters in percentage of available frame height. options:0-100. default:5path=nameβ path to font filecharset=stringβ text encoding (only applicable to TrueType fonts, fyi)
π DESCRIPTION π
so d.text draws text in the active display frame on the graphics monitor. that's the whole job, and it ate π₯
you can feed it text through standard input, or redirect it from a file (classic UNIX redirection mechanism, iykyk). and here's the cute part: on top of all the command line options, you can also adjust colors, text size, font type, rotation angle, and boldness with commands inside the standard input. like, if you invoke d.text with no options on the command line and then just assign values to these options on lines within the standard input. main character energy honestly.
π Commands:
.C colorβ (where color is one of the available colors) causes text appearing on subsequent lines to be drawn in that color..G colorβ (where color is one of the available colors) causes the background of text appearing on subsequent lines to be drawn in that color..S sizeβ (where size is a percentage within the range 0 to 100) adjusts text size. and bestie, note this: a size of10would allow10lines to be drawn in the active display frame,5would allow the drawing of20lines, and50would allow the drawing of2lines. math is mathing π.F fontβ (where font is one of the fonts known by the GRASS programd.font) manipulates the font type. available fonts are listed in the GRASS manual entry ford.font. the default font type used (if unspecified by the user) isromans..R rotationβ (where rotation is an angle in degrees, counter-clockwise) to rotate the text..B 1β stipulates that following text be printed in bold. this command means bold on..B 0β turns bold off of all text appearing on lines beneath it. (bold off is used by default, if unspecified by the user.)
π EXAMPLE π
this command will print the short phrase "This is a test of d.text" in the active display frame using the color yellow, in bold, and using 4/100βths (4%) of the active frameβs vertical space per line:
d.text text="This is a test of d.text" color=yellow bgcolor=gray size=4
Displayed Text π¦
β οΈ NOTES β οΈ
- note that the GRASS command
d.titlecreates map TITLEs in a format suitable for input tod.text. slay, compatible. d.textneeds escape sequences that can be used within lines to change colors, boldness, and perhaps size.
no cap, that second one is a real note in the original and it's just out here stating a need. we love a mysterious queen. π
π SEE ALSO π
d.font, d.title, d.labels
π AUTHORS π
James Westervelt, U.S. Army Construction Engineering Research Laboratory
Updates by Huidae Cho
π SOURCE CODE π
Available at: d.text source code (history)
Accessed: Saturday Jan 17 05:40:37 2026
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page, bestie π«Ά this was the GRASS 8.4.2 Reference Manual for d.text(1), Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 β accessorized and documented with love πβ¨ go draw some text, periodt π
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms