mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-27 22:39:43 +03:00
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
|
Loosening content for printing
|
||
|
==============================
|
||
|
|
||
|
The role of functions placed in loosen.c is rearranging the printed content in
|
||
|
such a way that it will fit in the page width. The methods were chosen
|
||
|
according to the look of different pages after applying them, not on the base of
|
||
|
any standards.
|
||
|
|
||
|
|
||
|
Loosening passes
|
||
|
----------------
|
||
|
|
||
|
The page content is loosened in three passes. The next pass is applied only
|
||
|
if the previous didn't give a satisfying result. The later a pass is applied
|
||
|
the bigger interference in the page arrengement it means.
|
||
|
|
||
|
In the first pass the changes are applied to those elements which don't have
|
||
|
a chance to get entirely into the visibile scope of width - words which are
|
||
|
too long for the available page width, objects positioned beyond the page
|
||
|
borders and objects to big to fit a page.
|
||
|
|
||
|
The second pass handles too big tables. The tables can be divided into two kinds
|
||
|
- those responsible for page layout and those used only for holding data. For
|
||
|
both of them some routines are used. Text in the cells is shrunken and broken,
|
||
|
if this doesn't help the table cells are changed into inline containers as the
|
||
|
table is problably a layout one.
|
||
|
|
||
|
The third pass removes all margins and paddings. This saves a lot of space but
|
||
|
makes also the page much less readable, for this reason it is the last step of
|
||
|
loosening.
|
||
|
|