You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: TEXTALIGN command (align and space several text objects) #2144
OpenCADStudio has no TEXTALIGN command. In AutoCAD, TEXTALIGN lines up several text objects (TEXT, MTEXT,
attribute definitions) against a base text, along a vertical, horizontal or picked direction, and can space them
evenly. It is a common cleanup step on drawings with many labels, for example drawings that came from a PDF import.
The command name is already referenced in the alias table, so the alias is dead today: src/app/alias/pgp.rs:221 maps ALINEARTEXTO → TEXTALIGN, but no TEXTALIGN command is registered.
Not covered by existing commands
JUSTIFYTEXT changes the justification point of each text without moving it.
TORIENT changes the rotation.
ALIGN TEXT orizzontally and vertically? #246 (align text horizontally/vertically, closed) appears to be covered by those; neither moves several texts
into one line or column relative to a base text.
Expected behaviour (as in AutoCAD)
Prompts in AutoCAD:
Current settings: Align = Left, Spacing Mode = Current Vertical
Select text objects to align [alIgnment/Options]:
Select text object to align to [Point]:
Pick second point or [Options]:
Select the texts to move.
Pick the base text, which stays in place (or Point to align to a picked point).
Pick a second point: the alignment direction from the base text; with ortho on this gives a clean column or row.
Each selected text moves along the alignment line; content, height, rotation and style don't change.
alIgnment chooses Left / Center / Right. With Left, AutoCAD lines up the left edge of each text's text box (the drawn glyphs, as textbox reports them), not the insertion point. A text whose first glyph has
a small left side bearing therefore ends with an insertion X slightly below the base's.
Options:
Distribute: spread the texts evenly between two picked points.
Set spacing: a fixed distance between the texts.
Current vertical / Current horizontal: align in a column or row and keep the existing spacing.
Undo restores everything in one step.
Suggested acceptance check (checked in AutoCAD)
TEXT A at (0,0), B at (0,13), CCCCCC at (20,30), height 2.5, Standard style, left justified. TEXTALIGN, select B and CCCCCC, pick A as the base, second point (0,50).
Result in AutoCAD: A unchanged; B and CCCCCC keep Y = 13 and Y = 30, and their insertion X becomes base_box_left - own_box_offset (here about -0.26 and -0.18 with the txt font), so all three text boxes start at
the same X. Nothing else in the entities changes.
If you support OpenCADStudio on Patreon, send me either your GitHub username or this issue number in a Patreon message. After I verify your support, I will prioritize the issue.
Implemented in #2145. Note on the acceptance check: the -0.26 / -0.18 values come from the side bearings of AutoCAD's txt font. With a font that has no left bearing on B and C, the insertion X stays at the base's; the text boxes still line up. This is listed under Known limits in the PR.
Activity
github-actions commentedon Oct 25, 2026
Thank you for opening this issue.
If you support OpenCADStudio on Patreon, send me either your GitHub username or this issue number in a Patreon message. After I verify your support, I will prioritize the issue.
insanedps commentedon Oct 25, 2026
Implemented in #2145. Note on the acceptance check: the -0.26 / -0.18 values come from the side bearings of AutoCAD's txt font. With a font that has no left bearing on B and C, the insertion X stays at the base's; the text boxes still line up. This is listed under Known limits in the PR.
HakanSeven12 commentedon Oct 26, 2026
TEXTALIGN landed with #2188 (12 alignments, localized prompts). Thanks for the request and for the first implementation in #2145.