0

I am used to Emacs under Windows 10 and trying to switch to Ubuntu.

My Windows 10 Emacs font is M-x describe-font:

    name (opened by): -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
       full name: Courier New-10.0
            size: 13
          height: 16
 baseline-offset:  0
relative-compose:  0
  default-ascent: 12
          ascent: 12
         descent:  4
   average-width:  8
     space-width:  8
       max-width: 10

And the result is: enter image description here

The default Emacs font in Ubuntu is more beautiful but less readable for me (I have astigmatism): enter image description here

So to find the same font as in Windows, I use this setting in .emacs file:

(set-face-font 'default "-Mono-Courier New-normal-normal-normal-*-14-*-*-*-m-0-iso10646-1")

I like the font which is for me more easy to read but colours contrasts are too low. Why? enter image description here

For colours I use:

(set-foreground-color "wheat")
(set-background-color "#273149")
(set-cursor-color "white")

And web-mode: http://web-mode.org/

(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))

How to find the same font style and colourisation I am used to on Windows?

  • To me the colors look ok, but in your Ubuntu screenshot, they don't "pop" like your Windows screenshot. Instead of mucking about with Emacs's colors, try changing the gamma and brightness of the Xorg server. (I assume you're using the same monitor for Windows and Ubunutu, so hardware settings are out.) You can do this via a terminal and with the xrandr utility. See this SE post for examples and a gotcha. – nega Jan 23 at 15:38
  • @nega Strange but if I choose the bold version of Courier New, the colours "pop" better and are more readable with these "popped" colours but I don't like the bold version. (set-face-font 'default "-Mono-Courier New-bold-normal-normal-*-14-*-*-*-m-0-iso10646-1"): i.imgur.com/iPUdRRS.png Maybe I am too used to Windows fonts and should get used to Ubuntu/Linux ones! – London Smith Jan 24 at 13:15
  • My best guess is that this is a difference between Linux and windows don’t rendering. Maybe you can change font-config to make hinting more aggressive to help with this. – Dan Robertson Jan 25 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.