Text columns centered around an offset?

The width function does exist, that sounds like measure. Something like this will tell you the width of [abc] in the current style - that’s why it depends on context:

context {
  let size = measure([abc])
  size  // size has fields height, width
}

Note that the result has to be used inside the same context block, or you can move the context scope really far out to encompass the whole function using this, in some cases.

If you need to measure something that line wraps or takes available page space into account, then you need to use layout in addition to measure.

1 Like