bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31904: scatch/ns-drawing


From: address@hidden
Subject: bug#31904: scatch/ns-drawing
Date: Sun, 19 Aug 2018 16:51:36 -0700


> On Aug 19, 2018, at 2:59 AM, Alan Third <address@hidden> wrote:
> 
> On Sat, Aug 18, 2018 at 12:23:02PM -0700, address@hidden wrote:
>> Another wrinkle (emacs-26 with patch applied):
>> 
>> When I change my font, all the text disappears except for the current line.
>> 
>> The text comes back if:
>> 
>> - I move the cursor over the affected areas.
>> - I wait a bit (from the cursor line down renders).
>> - Switch away to a non-Emacs window.
>> 
>> Seems like as soon as there’s a reason to paint the screen, it comes back.
> 
> I take it the frame changes size when you change font?
> 
> If you evaluate this does the frame redraw right?
> 
>  (set-frame-width nil 103)

The frame’s size does not change (if you mean the window gets narrower for a 
narrower font, say).

The set-frame-width expression doesn’t make any difference when I change from 
Monoco to Menlo and back.

Another interesting thing:

* The problem does NOT occur when changing the size of the font.

* If I change the font (to Monaco), the screen blanks, but immediately running 
a command to change the font size “fixes” it.

Seems that the font-change isn’t triggering a “repaint the whole thing”, 
rather, just repaint the line containing the pointer.


Functions involved in font-size change (really just set-face-attribute):

(defun kfi/set-font-size (size)
  "Set the font SIZE."
  (interactive "nNew size: ")
  (set-face-attribute 'default nil :height size))

(defun kfi/font-size-up ()
  "Shift font size up by 10 units."
  (interactive)
  (kfi/set-font-size (+ (face-attribute 'default :height) 10)))

(defun kfi/font-size-down ()
  "Shift font size down by 10 units."
  (interactive)
  (kfi/set-font-size (- (face-attribute 'default :height) 10)))








reply via email to

[Prev in Thread] Current Thread [Next in Thread]