[Geany-Devel] Printing

Colomban Wendling lists.ban at herbesfolles.org
Fri Nov 2 21:03:24 UTC 2012


Le 02/11/2012 15:49, Roger Booth a écrit :
> On 11/02/2012 06:59 AM, Colomban Wendling wrote:
>> Le 02/11/2012 01:12, Roger Booth a écrit :
>>> I found a new problem just now. I changed the font size from 10 to 12.
>>> Text that is tab-aligned on the screen, and tab-aligned in Print Preview
>>> when the font size is 10 is no longer tab-aligned in Print Preview when
>>> the font size is 12.
>> I'm unable to reproduce this, could you provide a small sample showing
>> the issue?  Though this sounds like a Scintilla issue, I doubt anything
>> we can do could change that.
> Attached is an example. I see a problem in Print Preview when I change
> to either font size 12 or font size 8.

OK, gotcha (after a looong and boring dig into Scintilla code, beuah).
Actually Scintilla doesn't setup its Pango layouts for the actual target
Cairo surface but always for the widget's one, so some of the
measurements were done using a layout setup for the screen, thus the
sizing problem with the cairo_scale()s.  Attached patch should (and does
here) fix the issue
(0004-Scintilla-properly-update-the-Pango-contexts-for-the.patch).

Additionally it made me see that the scaling was inaccurate because
Scintilla don't use the default Pango scale but the scale for the screen
(which is correct), which changes depending on the screen's DPI.

I attach all patches.  They are based upon the printing-with-scintilla
branch but should apply cleanly on master.

Regards,
Colomban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Printing-fix-text-resolution.patch
Type: text/x-patch
Size: 4305 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20121102/643aac41/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Printing-draw-the-vertical-separator-line-more-accur.patch
Type: text/x-patch
Size: 1644 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20121102/643aac41/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Printing-fix-improper-margins-when-printing-to-a-phy.patch
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20121102/643aac41/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Scintilla-properly-update-the-Pango-contexts-for-the.patch
Type: text/x-patch
Size: 1628 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20121102/643aac41/attachment-0003.bin>


More information about the Devel mailing list