Pre-calculated line breaks demo

See page source and accompanying blog post for details. Use your browser’s responsive design mode developer tools to experiment with different page widths.

As of Safari 13, Safari is not supported and just uses the browser default line breaks.


Pre-calculated Knuth–Plass line breaks

Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people’s hats off—then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me.

There now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs—commerce surrounds it with her surf. Right and left, the streets take you waterward. Its extreme downtown is the battery, where that noble mole is washed by waves, and cooled by breezes, which a few hours previous were out of sight of land. Look at the crowds of water-gazers there.

Circumambulate the city of a dreamy Sabbath afternoon. Go from Corlears Hook to Coenties Slip, and from thence, by Whitehall, northward. What do you see?—Posted like silent sentinels all around the town, stand thousands upon thousands of mortal men fixed in ocean reveries. Some leaning against the spiles; some seated upon the pier-heads; some looking over the bulwarks of ships from China; some high aloft in the rigging, as if striving to get a still better seaward peep. But these are all landsmen; of week days pent up in lath and plaster—tied to counters, nailed to benches, clinched to desks. How then is this? Are the green fields gone? What do they here?


Browser-default line breaks

Call me Ish­mael. Some years ago—never mind how long pre­cisely—hav­ing lit­tle or no money in my purse, and noth­ing par­tic­u­lar to in­ter­est me on shore, I thought I would sail about a lit­tle and see the wa­tery part of the world. It is a way I have of dri­ving off the spleen and reg­u­lat­ing the cir­cu­la­tion. When­ever I find my­self grow­ing grim about the mouth; when­ever it is a damp, driz­zly No­vem­ber in my soul; when­ever I find my­self in­vol­un­tar­ily paus­ing be­fore cof­fin ware­houses, and bring­ing up the rear of every fu­neral I meet; and es­pe­cially when­ever my hy­pos get such an up­per hand of me, that it re­quires a strong moral prin­ci­ple to pre­vent me from de­lib­er­ately step­ping into the street, and me­thod­i­cally knock­ing peo­ple’s hats off—then, I ac­count it high time to get to sea as soon as I can. This is my sub­sti­tute for pis­tol and ball. With a philo­soph­i­cal flour­ish Cato throws him­self upon his sword; I qui­etly take to the ship. There is noth­ing sur­pris­ing in this. If they but knew it, al­most all men in their de­gree, some time or other, cher­ish very nearly the same feel­ings to­wards the ocean with me.

There now is your in­su­lar city of the Man­hat­toes, belted round by wharves as In­dian isles by coral reefs—com­merce sur­rounds it with her surf. Right and left, the streets take you wa­ter­ward. Its ex­treme down­town is the bat­tery, where that no­ble mole is washed by waves, and cooled by breezes, which a few hours pre­vi­ous were out of sight of land. Look at the crowds of wa­ter-gaz­ers there.

Cir­cum­am­bu­late the city of a dreamy Sab­bath af­ter­noon. Go from Cor­lears Hook to Co­en­ties Slip, and from thence, by White­hall, north­ward. What do you see?—Posted like silent sen­tinels all around the town, stand thou­sands upon thou­sands of mor­tal men fixed in ocean rever­ies. Some lean­ing against the spiles; some seated upon the pier-heads; some look­ing over the bul­warks of ships from China; some high aloft in the rig­ging, as if striv­ing to get a still bet­ter sea­ward peep. But these are all lands­men; of week days pent up in lath and plas­ter—tied to coun­ters, nailed to benches, clinched to desks. How then is this? Are the green fields gone? What do they here?