Skip to content

Interface: TextSize

Defined in: common/textmeasure.ts:17

Estimated size of a text string in points.

Properties

h

ts
h: number;

Defined in: common/textmeasure.ts:19


w

ts
w: number;

Defined in: common/textmeasure.ts:18


yoffsetCenterline?

ts
optional yoffsetCenterline?: number;

Defined in: common/textmeasure.ts:27

Baseline→centerline offset in points (C textspan_t.yoffset_centerline). The vertical metric is part of the measurement model: native graphviz's estimate uses 0.1·fontsize, while the font-plugin (pango) path is ≈0.05·fontsize. When omitted, callers default to the 0.05·fontsize (pango-calibrated) value.

See

lib/common/textspan.c:estimate_textspan_size


yoffsetLayout?

ts
optional yoffsetLayout?: number;

Defined in: common/textmeasure.ts:34

Baseline→top (ascent) in points (C textspan_t.yoffset_layout). Native estimate uses fontsize; the freetype/pango path uses the font ascent (~0.89·fontsize). When omitted, callers fall back to the freetype ascent.

See

lib/common/textspan.c:estimate_textspan_size