I have defined my faces for the term group that way:

 '(term ((t (:inherit default :family "Courier"))))

and all other colours pretty similarly. (I have also tried defining it without using inheritance – I've stated all colour values etc explicitly but it didn't change the behaviour)

so my intention was that it would be the same face as the default one but with a different font. For some reason it doesn't work how it should...

When I turn on the ansi-term the first opening lines are indeed written in the courier font but then when I just hit enter it goes away and falls back to the default. You can see it in the picture: ansi-term buffer

I've started the ani-term in my .emacs.d directory. The information about zsh and the first prompt are in the courier font but as soon as I've entered enter it turned off. The weird thing you can see in the listing is that the courier font holds with the bold blue text (eg the word "themes") but for the black text (eg "tramp") – not anymore.

When I inspected this with C-u C-x = on the first prompt the result was

mac-ct:-*-Courier-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x4A)
font-lock-face       term

but when I tested it just one line after the first one it was

mac-ct:-*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x44)
font-lock-face       (:foreground "black" :background "#e3dfca" :inverse-video nil)

so initially my settings work but then they somehow don't.

I've found a similar issue about which someone has already asked before but they didn't receive any helpful answers.

I'd be happy if someone could help me resolve this issue.

Here's full customisation for the record (here term being just the font family but it doesn't change anything) – all other faces from there work apart from the term one

 '(term ((t (:family "Courier"))))
 '(term-bold ((t (:weight bold :family "Courier"))))
 '(term-color-black ((t (:background "black" :foreground "black" :family "Courier"))))
 '(term-color-blue ((t (:background "medium blue" :foreground "medium blue" :family "Courier"))))
 '(term-color-cyan ((t (:background "cyan3" :foreground "cyan3" :family "Courier"))))
 '(term-color-green ((t (:background "green4" :foreground "green4" :family "Courier"))))
 '(term-color-magenta ((t (:background "magenta3" :foreground "magenta3" :family "Courier"))))
 '(term-color-red ((t (:background "red3" :foreground "#b12512" :family "Courier"))))
 '(term-color-white ((t (:background "white" :foreground "white" :family "Courier"))))
 '(term-color-yellow ((t (:background "yellow4" :foreground "yellow4" :family "Courier"))))
 '(term-underline ((t (:underline t :family "Courier")))))

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.