View Single Post
Old 10-29-2011, 11:36 AM   #102
foosion
Connoisseur
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 59
Karma: 4562
Join Date: Sep 2011
Device: Pixel 4a
Quote:
Originally Posted by dwanthny View Post
Side margins are simple but top and bottom margins, while possible, are quite a bit harder when you are dealing with a format that has unpredictable page lengths.
Top and bottom margins should be easy to program.

Instead of writing to the screen starting at y coordinate 0 (relative to the containing window), start writing to the screen at y coordinate margin-top (and stop at bottom of window minus margin-bottom). You wouldn't have to make any changes to the flow of the underlying text.

Left and right margins are more complicated, as the text does have to be re-flowed as they change.
foosion is offline   Reply With Quote