Skip to content

Releases: lyallcooper/justif

justif 0.9.1

Choose a tag to compare

@github-actions github-actions released this 20 Aug 00:32
adbe130
  • Fixed cramped spacing and overflowing lines around an inline formula once the
    fonts inside it finished loading. Fixes #17.
  • Firefox no longer moves a <math> formula and the rest of its line down to
    the next line at some column widths, leaving a gap mid-paragraph.
  • Fixed a line whose end the browser moved down on its own being stretched to
    several times its natural word spacing, seen in Chrome on lines holding a
    no-break space.
  • New data-justif-defer attribute holds the drop-in script back until other
    scripts that transform text (e.g. math rendering, syntax highlighting) have
    run. See the README
    section
    .

justif 0.9.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 23:28
fb4ed88
  • Paragraphs with <math> or inline-block elements are now supported by
    justif. Fixes #17.
  • Fixed justified text pushing the page wider in Safari, seen most often as a
    sideways scroll on iPhone. Fixes #16.
  • Hyphenation dictionary downloads are about a third smaller.
  • A quote or other mark ending a line beside a drop cap no longer drifts away
    from the character before it.
  • Fixed a small word-spacing error on lines beside a drop cap.

justif 0.8.1

Choose a tag to compare

@github-actions github-actions released this 14 Aug 07:35
a6d8327
  • Chrome no longer sometimes pushes a line out from beside a drop cap, leaving
    a gap next to it and a short line below.

justif 0.8.0

Choose a tag to compare

@github-actions github-actions released this 13 Aug 07:12
b23715d
A paragraph justified beside an ornate floated initial
  • Paragraphs can now begin with a floated element. Text besides the float is justified to the available width.
  • Which characters hang is now configurable. See the README section for configuration details.
  • Uppercase and lowercase css text transformations no longer prevent justification.
  • Resizing no longer briefly displays incorrect line breaks, especially beside drop caps.
  • Hanging punctuation no longer shifts adjacent text out of alignment.
  • Short final lines no longer wrap unnecessarily beside a float.
  • Fixed-width spaces such as &emsp and &ensp now retain their original characters and widths.
  • Fixed justification failures in lines combining hanging punctuation and nonstandard spaces.
  • Paragraphs containing uncommon control or separator characters now safely use browser justification.

justif 0.7.2

Choose a tag to compare

@github-actions github-actions released this 07 Aug 00:28
8520832
  • Breaks can now happen properly after dashes. Lines may now end in an em or en dash, though a line will never start with a dash. Number ranges such as "1914—1918" will prefer to stay unbroken, however.

justif 0.7.1

Choose a tag to compare

@github-actions github-actions released this 03 Aug 03:59
61d687d
  • Fixed a bug where copying text could unexpectedly have a leading space.

justif 0.7.0

Choose a tag to compare

@github-actions github-actions released this 01 Aug 13:14
fba225f

Notable changes

  • 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.

justif 0.6.5

Choose a tag to compare

@github-actions github-actions released this 28 Jul 02:40
6b87ce2
  • Long single-paragraph passages now reflow much faster, including the
    4,400-word excerpt on the demo page.
  • On-screen paragraphs now receive their final spacing before justify()
    returns, avoiding a brief overhang when pages enhance before first paint.

justif 0.6.4

Choose a tag to compare

@github-actions github-actions released this 26 Jul 00:34
e8f115d
  • Justif now loads on Safari and iOS below 16.4.
  • hyphens: none is now honored on an inline run whose type matches the
    surrounding prose.
  • Enhancement is about 13% faster on body text.
  • Copying a selection that spans paragraphs from separate justify() calls no
    longer drops author non-breaking spaces.
  • Pages that justify document after document no longer grow their memory
    without bound as more text is measured.

justif 0.6.3

Choose a tag to compare

@github-actions github-actions released this 25 Jul 06:04
fb224fe
  • Fixed a few lines of a paragraph stretching to word spacing tens of pixels
    wide on pages whose CSS lets the browser break long words:
    overflow-wrap: break-word or anywhere, word-break: break-all, or
    line-break: anywhere. Those declarations could also move an inserted
    hyphen to the start of the following line; hyphens now stay at the end of
    the line they break (#10). Only paragraphs on screen when
    justify() ran showed the spacing, so the same text could look correct
    until it was scrolled into view.