You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, punctuation is now only hung off the line ends. The previous
default also hung punctuation off of the start of the first line of
each paragraph. Set hangingPunctuation to "first-line-and-line-ends" to
get the old default.
Behavior change: protrusion: false no longer switches off hanging
punctuation automatically. hangingPunctuation settings will now be respected
(but not optically aligned) if protrusion is disabled.
API change (non-breaking): hangingPunctuation's options are now "line-end-only", "first-line-and-line-ends", "all-line-edges", or "none". See the README
section
for more details.
The drop-in script is now configurable via CSS. Set --justif-* custom
properties on :root to configure a whole page, or on any element to change
one section or a single paragraph: hanging punctuation, protrusion, expansion,
tracking, word-space limits, and the last-line settings. See the README
section for
details.
Optical margin alignment now dynamically measures each font's letterforms
instead of relying on a hard-coded table. This allows for great alignment for
any arbitrary font you use with Justif. See the README
for more details.
Various fixes
justify() now accepts partial expansion and spacing objects, filling in
the rest from the defaults, as tracking already did.
New exported layoutDefaults gives the default value of every setting the CSS
surface covers, for building configuration UI.
Fixed paragraphs in a language other than English never being hyphenated when
every paragraph in that language happened to fit on one line as the page
loaded. Narrowing the window later wrapped them without hyphens.
justify()'s controller now also exposes managed: the paragraphs it is
still responsible for, excluding any it declined and any released since.
New controller.applyLayoutOptions(config) changes typography settings on a
live controller and re-lays out in place, without the teardown and rescan that destroy() plus justify() costs. Settings it does not cover — the
hyphenator, callbacks — are left alone.
Opening brackets are no longer forced fully into the margin. Measured fonts
use their own bracket shapes; the built-in tables give parentheses a slight
overhang and leave square brackets flush.
One-line paragraphs now receive the same visible line-start alignment as
longer paragraphs, without replacing their native markup.
Unchanged one-line paragraphs no longer trigger onRelayout during a resize
or refresh().
Monospace fonts no longer indent individual edge glyphs, preserving their
visible character grid.
Fixed Safari keeping the fallback font's line breaks and spacing when a font
arrives after the text is justified, such as one loaded by a script or by
late-running CSS.
Fixed a wide gap opening beside an italic, bold, small-caps, or linked run
in Charter, Hoefler Text, and a few other fonts, with every other word space
on that line squeezed narrow to make room for it.