d.text(1grass)
β¨ d.text β¨ (the GRASS text-drawing icon)
okay bestie, gather round π this is d.text from the GRASS User's Manual β it draws text in the active display frame on your graphics monitor, using the current font. that's it, that's the whole vibe. also it's d.text(1grass) if you're being formal, and its keywords are display and 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 ([0,0] is the top left, so like, screen coords, not map coords)-gβ screen position in geographic coordinates (map brain mode πΊοΈ)-bβ use bold text, yes queen-rβ rotation is in radians instead of degrees-sβ font size means height in pixels--helpβ print usage summary--verboseβ verbose module output (chatty mode)--quietβ quiet module output (shh mode)--uiβ force launching the GUI dialog
π Parameters
text=stringβ Text to displayinput=nameβ Input filecolor=nameβ Text color. Either a standard color name orR:G:Btriplet. Default:graybgcolor=nameβ Text background color. Either a standard color name,R: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, [0,0] is lower left)line=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)
π DESCRIPTION π
so d.text draws text in the active display frame on the graphics monitor. periodt.
You can feed it text through standard input, or redirect it from a file (you know, the classic UNIX redirection mechanism π). And here's the fun part: on top of all the command-line options, you can also tweak colors, text size, font type, rotation angle, and boldness with commands inside standard input. like, if you run d.text with no options on the command line and then assign values to those options on lines within the standard input β yeah, that works. main character behavior fr fr.
π Commands
.C colorβ where color is one of the available colors. Makes text on all the subsequent lines get drawn in that color. π.G colorβ where color is one of the available colors. Makes the background of text on subsequent lines get drawn in that color..S sizeβ where size is a percentage in the range0to100. Adjusts text size. Heads up bestie: a size of10would let10lines be drawn in the active display frame,5would allow the drawing of20lines, and50would allow the drawing of2lines. math is math. β¨.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. Rotates the text. π.B 1β stipulates that following text be printed in bold. This command means bold on..B 0β turns bold off for all text appearing on lines beneath it. (Bold off is used by default, if unspecified by the user.)
π EXAMPLE π
the following 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
(and yes, Displayed Text is literally the caption of that render β she's labeled, your honor π)
π¦ NOTES π¦
- note that the GRASS command
d.titlecreates map TITLEs in a format suitable for input tod.text. cute crossover episode π«Ά d.textneeds escape sequences that can be used within lines to change colors, boldness, and perhaps size. (yes, "perhaps" β that's what the manual says, not me, I don't make the rules π)
π SEE ALSO π
d.fontd.titled.labels
π AUTHORS π
- James Westervelt, U.S. Army Construction Engineering Research Laboratory
- Updates by Huidae Cho
π₯ SOURCE CODE π₯
Available at: d.text source code (history)
Latest change: Monday Nov 03 07:16:48 2025 in commit: c96796774942e46bbababcd652d3986d4e295665
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
okay that's the whole page, no notes left behind, every flag accounted for π this was d.text(1grass) from GRASS 8.5.0 β and the footer tells us it's GRASS 8.5.0 all the way down, so go draw some pretty words on your monitor and slay β¨π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· 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