[Geany-Devel] Printing

Colomban Wendling lists.ban at herbesfolles.org
Thu Nov 1 13:13:17 UTC 2012


Le 01/11/2012 04:10, Roger Booth a écrit :
> I applied the patch. Page 1 of the printout has 54 lines, Print Preview
> has 56.
> 
> The vertical line on Print Preview looks fine, on the hard copy it
> appears on top of the least significant digit of the line number. For
> example, on line 1, the vertical line is superimposed on the vertical
> line that comprises most of the 1's glyph.

Well well… I have less and less ideas, but what if you comment out lines
312-323 (after patching)?  I copied this logic from SciTE, but I'm not
sure it's correct, maybe this should not be included and is only useful
when dealing directly with the page setup and paper size.

> The vertical line extends down "a ways" past the last line number. On
> Print Preview, it extends what seems to be one line height, or so. On
> hardcopy, it extends what might be three lines, its difficult to
> measure. Perhaps it is drawn to the top of the page number row, but the
> last printed line is one line less?

The vertical line is drawn from the header to the "bottom of the area
minus one line height".  This should be roughly correct, but in theory
could go "line height -1px" too far if the print area isn't a multiple
of lines.  Getting this right would be (area_height - (area_height %
line_height)), but it'd require to know the exact line_height Scintilla
uses, including the blanks between lines.

And the bigger offset in the hard copy might come from the maybe
improper margin I was speaking about before.

> Anyway, the good news is that my test doc, page one anyway, does not wrap.

Yeah, at least the font sizing is better.

Regards,
Colomban


More information about the Devel mailing list