-
-
Notifications
You must be signed in to change notification settings - Fork 79
Description
This is another issue related to #336. Suppose #336 is fixed, "File > Print definitions... > [print dialogue opens]" does print non-blank pages on Linux. But the font size of the printed file is larger than the font size set in the preference or "View > Decrease Font Size/Increase Font Size". According to the documentation:
A “point” for font sizing is equivalent to (/ 96 72) drawing units.
So the actual print font size is 1.33 times the set font size. This really makes it painful on Linux because we have to change the font size of the editor when printing and change it back after printing. On Windows there is no such problem. It seems page calculation/draw is done in the following code:
gui/gui-lib/mred/private/wxme/text.rkt
Lines 5956 to 5960 in 03b7ffa
| (define/private (has/print-page dc page print?) | |
| (if flow-locked? | |
| #f | |
| (begin | |
| (recalc-lines dc #t) |
gui/gui-lib/mred/private/wxme/text.rkt
Lines 5631 to 5643 in 03b7ffa
| (send snip draw dc (+ x dx) (+ down dy) | |
| tleftx tstarty trightx tendy | |
| dx dy | |
| (if (pair? show-caret) | |
| (cons p (+ p (snip->count snip))) | |
| (if (eq? snip s-caret-snip) | |
| show-caret | |
| (if (and maybe-hilite? | |
| (-endpos . > . p) | |
| (-startpos . < . (+ p (snip->count snip)))) | |
| (cons (max 0 (- -startpos p)) | |
| (min (snip->count snip) (- -endpos p))) | |
| 'no-caret)))))) |
Here snip's font is used for both page number calculation and printing. Is there a way to automatically scale when printing so that the print font size is adjusted to the actual font size?