Forum Bugs

why is Prince breaking this paragraph so badly?

chrisryland
The code is below. Note all the soft hyphens at each camel-case break, and yet note how there's a massive space after loadFont-<break>Catalog, even though what's after it has many soft hyphens where it could wrap.

Puzzled.

<p class="docpress-continuation">Camel-case naming debates add many near-duplicates. A review may compare <code>create&shy;Render&shy;Job</code>, <code>create&shy;Renderer&shy;Job</code>, <code>create&shy;Pdf&shy;Render&shy;Job</code>, and <code>create&shy;Published&shy;Document&shy;Render&shy;Job</code>, then ask whether <code>load&shy;Font&shy;Catalog</code>, <code>load&shy;Font&shy;Set&shy;Catalog</code>, <code>load&shy;Document&shy;Font&shy;Set&shy;Catalog</code>, and <code>load&shy;Resolved&shy;Document&shy;Font&shy;Set&shy;Catalog</code> are too similar. It may mention <code>is&shy;Preview&shy;Mode</code>, <code>has&shy;Preview&shy;Mode</code>, <code>should&shy;Use&shy;Preview&shy;Mode</code>, <code>can&shy;Use&shy;Preview&shy;Mode</code>, and <code>was&shy;Preview&shy;Mode&shy;Requested</code> in one dense paragraph. Those names should remain individually inspectable without turning the whole paragraph into a stripe of dark code spans.</p>
  1. CleanShot 2026-05-22 at 16.15.39@2x.png288.3 kB
pjrm
Could you please upload the CSS as well, to help reproducing?
chrisryland
.document-body {
hyphens: auto;
font-variant-ligatures: common-ligatures contextual;
text-align: var(--docpress-text-align-body);
}

.document-body > p {
margin: 0;
}

.document-body > p.docpress-continuation {
margin-top: var(--docpress-paragraph-continuation-margin-top);
text-indent: var(--docpress-paragraph-continuation-text-indent);
}

.document-body code {
font-family: var(--docpress-font-mono);
font-variant-ligatures: none;
line-height: inherit;
}

.document-body :not(pre) > code {
font-size: calc(1em * var(--docpress-mono-code-scale));
line-height: 0;
overflow-wrap: break-word;
word-break: normal;
}

.document-body .docpress-inline-code-space {
font-family: var(--docpress-font-body);
}

body.layout-two-column .document-body {
column-count: 2;
column-fill: balance;
}

for this case, the critical root vars are:

--docpress-text-align-body: justify;
--docpress-font-body: 'Libre Baskerville', serif;
--docpress-font-mono: 'Inconsolata', monospace;
--docpress-mono-code-scale: 1.094;