Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line numbers do not fit when the text is scaled up #240

Closed
d-g opened this issue Jul 16, 2016 · 6 comments
Closed

Line numbers do not fit when the text is scaled up #240

d-g opened this issue Jul 16, 2016 · 6 comments

Comments

@d-g
Copy link

d-g commented Jul 16, 2016

Steps to reproduce:

  • M-x load-theme RET solarized-light
  • M-x linum-mode
  • C-x C-=

Result:
Result

There is no problem with no theme loaded, of course.

GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.25), solarized-theme 20160515.442

@kshenoy
Copy link

kshenoy commented Jul 20, 2016

I'm seeing this too. Is it possible to specify that the face used for line numbers be of fixed width and the height used by non-section headings?

@thomasf
Copy link
Collaborator

thomasf commented Jul 20, 2016

Hmm. I'm not seeing this..

I'm compiling from the emacs25 branch daily (GNU Emacs 25.0.95.28 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-07-19).. The main difference there seems to be gtk3, I don't know if that makes any difference for this issue. Maybe it's the difference in font settings which causes the problems, idk.

image

@thomasf
Copy link
Collaborator

thomasf commented Jul 20, 2016

It also works for me if I set default and fixed-pitch to "Pragmata Pro-13" and variable-pitch to "Pt Sans-13"

To be more specfic, running my-set-fonts with either one of these works (I tried a couple of alternatives):

      (setq my-monospaced-font "Pragmata Pro-13"
            my-variable-pitch-font "Pt Sans-13")

      (setq my-monospaced-font "Consolas-13"
            my-variable-pitch-font "Pt Sans-13")

      (setq my-monospaced-font "Pragmata Pro-15"
            my-variable-pitch-font "Pt Sans-15")
    (defun my-set-fonts  ()
      (interactive)
      (when window-system
        (condition-case nil
            (progn
              (set-face-attribute 'default nil :font my-monospaced-font)
              (set-face-attribute 'fixed-pitch nil :font my-monospaced-font)
              (set-face-attribute 'variable-pitch nil :font my-variable-pitch-font))
          (error
           (progn
             (message
              "Setting default fonts failed, running dynamic-fonts-setup...")
             (dynamic-fonts-setup))))))

@kshenoy
Copy link

kshenoy commented Jul 20, 2016

@thomasf I believe these are the only customisations I'm doing to my faces.

@kshenoy
Copy link

kshenoy commented Jul 20, 2016

Ok, I haven't been able to root cause the issue but I think I've found a workaround for it.

(set-face-attribute 'fixed-pitch nil :font my-monospaced-font)
(set-face-attribute 'linum       nil :inherit 'fixed-pitch)

This is not a solarized issue since solarized seems to be setting only the :foreground and :background attributes for 'linum

My guess is that 'linum grabs the attributes from the text on that line. Which may be why @d-g was seeing this only when a theme is loaded.

@thomasf
Copy link
Collaborator

thomasf commented Dec 3, 2016

Does not seem to be a local issue, closing.

@thomasf thomasf closed this as completed Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants