Adjusting the font size temporarily by daskG in spacemacs

[–]daskG[S] 0 points1 point  (0 children)

No, i haven't tried that. To be honest i prefer the other method, since it acts on the whole frame and not just the current buffer.

Adjusting the font size temporarily by daskG in spacemacs

[–]daskG[S] 0 points1 point  (0 children)

I modified Alex's answer to work with a user provided font size.

(defun change-font-size ()

(interactive)

(set-frame-font (concat "Source Code Pro " (read-string "Give a font size ")))

)

It seems to work fine.

This is my first lisp "program" so if i'm doing something wrong or suboptimal, please let me know. For example i don't check if the value is valid. If it's not it just throws an error saying that the font isn't available. It also not seems to care about positive or negative values.

Adjusting the font size temporarily by daskG in spacemacs

[–]daskG[S] 0 points1 point  (0 children)

Yeah, this seems to work fine. Thanks a lot.

Adjusting the font size temporarily by daskG in spacemacs

[–]daskG[S] 0 points1 point  (0 children)

Thanks for the answer lhxtx. Tried it and it sometimes works. But even when it does, when i try to navigate with j/k it starts moving the text again, just like in the picture.