Releases: lyallcooper/justif
Releases · lyallcooper/justif
Release list
justif 0.9.1
- 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-deferattribute 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
- Paragraphs with
<math>orinline-blockelements 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
- 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
- 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
&emspand&enspnow 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
- 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
- Fixed a bug where copying text could unexpectedly have a leading space.
justif 0.7.0
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. SethangingPunctuationto"first-line-and-line-ends"to
get the old default. - Behavior change:
protrusion: falseno longer switches off hanging
punctuation automatically.hangingPunctuationsettings 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:rootto 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 partialexpansionandspacingobjects, filling in
the rest from the defaults, astrackingalready did.- New exported
layoutDefaultsgives 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 exposesmanaged: 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()plusjustify()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
onRelayoutduring a resize
orrefresh(). - 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
- 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
- Justif now loads on Safari and iOS below 16.4.
hyphens: noneis 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
- 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-wordoranywhere,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.