geany/geany — pull request #56 by b4n (2012-07-30 01:44:19+00:00)
Title: Rewrite GTK printing using Scintilla

From the important commit's message:

> Rewrite GTK printing using Scintilla
>
> We used to draw the pages to print ourselves, but it is a tedious and
> error-prone task (and we did made mistakes) that Scintilla would do
> better by itself. So, rewrite the GTK (e.g. non-external) print code
> to use Scintilla's built-in capabilities of drawing the buffer's
> content on the pages.
>
> Not only this makes the code a lot simpler and shorter, but it gives a
> more accurate render (proper handling of tab stops, wrapping on word
> boundaries, no missing character when a wrapped line spans on multiple
> pages, ...), and it is noticeably faster (around 3 times).
>
> Additionally we now paginate properly, which fixes printing starting
> after page 1 or printing non-contiguous pages (we used to always print
> starting from page 1 and counting, no matter what pages were selected).
>
> However, note that obviously the render is not the same, even though
> it's quite similar.

Although this seems to work just fine (and even better) than the previous implementation, I'm wondering if there was a particular reason not to use the built-in Scintilla feature? Or maybe it's quite new in Scintilla? @eht16: maybe you would know better since it seems you were almost the only one to have touched that file?