Descriptions and values are drawn as a single line that never wraps. A diagram is
scaled to fit the width it is rendered into, so the longest label is what decides
that scale — one long description makes the whole diagram, bit cells and indices
included, shrink until that line fits.
Before — config.config(), in a document 700pt wide:
After — config.config(description-width: 460), same schema, same page:
What the option does
description-width wraps labels at that width, so the length of a description no
longer decides how large the diagram is drawn. Values wrap at the same right edge as
the description they belong to. It composes with left-labels, force-descs-on-side and ltr-bits.
Wrapping means a label is no longer one line tall, so labels can no longer be spaced
by a fixed line height. Each is now offset by the height it actually occupies,
measured before it is placed. That is why render gained a context block.
Compatibility
The option defaults to none, which keeps the single-line behaviour on the original
code paths.
## Problem
Descriptions and values are drawn as a single line that never wraps. A diagram is
scaled to fit the width it is rendered into, so the longest label is what decides
that scale — one long description makes the whole diagram, bit cells and indices
included, shrink until that line fits.
**Before** — `config.config()`, in a document 700pt wide:

**After** — `config.config(description-width: 460)`, same schema, same page:

## What the option does
`description-width` wraps labels at that width, so the length of a description no
longer decides how large the diagram is drawn. Values wrap at the same right edge as
the description they belong to. It composes with `left-labels`,
`force-descs-on-side` and `ltr-bits`.
Wrapping means a label is no longer one line tall, so labels can no longer be spaced
by a fixed line height. Each is now offset by the height it actually occupies,
measured before it is placed. That is why `render` gained a `context` block.
## Compatibility
The option defaults to `none`, which keeps the single-line behaviour on the original
code paths.
Descriptions and values are drawn as a single line that never wraps.
Because a diagram is scaled to fit the width it is rendered into, the
longest label is what decides that scale: one long description makes the
whole diagram -- bit cells, indices and every other label with it --
shrink until that line fits. A register whose fields carry a sentence
each is then unreadable at any page width, and since each diagram is
measured on its own, a document full of them renders every one at a
different size.
Setting description-width wraps labels at that width instead, so the
length of a description no longer decides how large the diagram is
drawn. Values wrap at the same right edge as the description they belong
to, and the option composes with left-labels, force-descs-on-side and
ltr-bits.
Wrapping means a label is no longer one line tall, so labels can no
longer be spaced by a fixed line height. Each is now offset by the
height it actually occupies, measured before it is placed, which is why
render gained a context block.
The option defaults to none, which keeps the single-line behaviour on
the original code paths. With it unset every diagram in the gallery
renders byte-identical to before.
HEL
added the enhancement label 2026-08-18 12:32:59 +00:00
Yes it looks very nice
I've skimmed the changes and it seems alright to me, I've just been quite busy this week and haven't had the time to review it
Will do asap
Yes it looks very nice
I've skimmed the changes and it seems alright to me, I've just been quite busy this week and haven't had the time to review it
Will do asap
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Descriptions and values are drawn as a single line that never wraps. A diagram is
scaled to fit the width it is rendered into, so the longest label is what decides
that scale — one long description makes the whole diagram, bit cells and indices
included, shrink until that line fits.
Before —
config.config(), in a document 700pt wide:After —
config.config(description-width: 460), same schema, same page:What the option does
description-widthwraps labels at that width, so the length of a description nolonger decides how large the diagram is drawn. Values wrap at the same right edge as
the description they belong to. It composes with
left-labels,force-descs-on-sideandltr-bits.Wrapping means a label is no longer one line tall, so labels can no longer be spaced
by a fixed line height. Each is now offset by the height it actually occupies,
measured before it is placed. That is why
rendergained acontextblock.Compatibility
The option defaults to
none, which keeps the single-line behaviour on the originalcode paths.
Any thoughts on this change?
Yes it looks very nice
I've skimmed the changes and it seems alright to me, I've just been quite busy this week and haven't had the time to review it
Will do asap
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.