Function Entry: TEXTBOX

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: TEXTBOX

Name

textbox

Class

Geometric / Host Function

Syntax

(textbox elist)

Arguments and Values

  • elist: entity definition list for a text object

Description

Returns two corner points that describe the text bounding box.

Return Values

List of two points, or nil.

Side Effects

None.

Compatibility

Depends on host text and font metrics behavior.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.

Notes

  • Autodesk documents that omitted text parameters in elist default to the current or default settings.
  • Autodesk documents that the minimum acceptable list is one containing only the text string.
  • Autodesk documents that the returned points are measured as if the text insertion point were (0,0,0) and rotation were 0, regardless of the actual insertion point and orientation.
  • Measured (probes/sources/probe-block-walk.lsp, suite text-metrics, AutoCAD 2022 and BricsCAD V26 macOS, Standard style, 2026-10-03): the box is the glyph INK extent, not the advance box – the lower-left x is the first glyph's left bearing. Both products agree on every horizontal value and apply no kerning (AV, To, … measure exactly the sum of the advances).
  • They differ vertically: AutoCAD reports a box that does not straddle the baseline as touching it (- gives y0 = 0; an all-below box gets y1 = 0), BricsCAD reports the true ink. AutoCAD gives spaces no ink (" " is a zero box); BricsCAD counts a space as ink up to its advance, at height 0.
  • BricsCAD's GetBoundingBox of a TEXT at the origin equals textbox of it.

clautolisp

clautolisp measures with the vendors' own numbers: *standard-glyph-metrics* (autolisp-runtime, generated by make -C clautolisp text-metrics from the probe runs) gives each printable ASCII glyph's left bearing, ink right edge, advance and ink bottom/top; characters outside ASCII use the metrics of n. Height (group 40) and width factor (group 41) scale the box. The vertical and space rules follow AutoCAD, or BricsCAD under a BricsCAD dialect. The TEXT/ATTRIB/ATTDEF GetBoundingBox is the same ink box placed at the alignment point and rotated.