Breaking an overlong word
A word too wide for its column: left whole, or cut to the edge.
A paragraph broken into lines, set four ways: left, right, centred, justified.
Hand the engine a paragraph and the width of a column, and it answers with lines. The same paragraph is set four times over on this page — aligned left, aligned right, centred, justified — so what each alignment does to the same words can be read off one sheet.
Line breaking is where a PDF library either saves you two weeks of work or costs you two. Nothing here counts characters: every possible line is measured in the font that will draw it, at the size it will be drawn at, which is the only way the right edge of a justified column comes out straight.
The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.
The same document is written in each of these languages. Open the one you want to look at.
| Before | 108,987 bytes |
|---|---|
| Now | 38,284 bytes |
| Saved | 64.9 % |
Not one mark on the page changed. See every document measured.
A word too wide for its column: left whole, or cut to the edge.
A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.
A justified column set twice: file paths and compounds running past the edge with no break points, then wrapping where a break after a slash or a hyphen is allowed.
One long passage poured into three columns, each fitting the lines its height allows and handing the rest to the next.
The same two paragraphs six ways: the indents, the room around a paragraph, its last line, its first line.
A contents page whose entries are led to their page numbers by dots the layout draws.