1

I recently changed my Linux distribution (from an old Opensuse 13.1 to Linux Mint 19, which comes with "GNU Emacs 25.2.2 of 2017-09-22, modified by Debian"), and now my very basic theme is not working correctly anymore. My theme file is only this:

(deftheme Labo
  "Created 2017-02-16.")

(custom-theme-set-variables  'Labo
 '(default-frame-alist (quote ((tool-bar-lines . 0) (height . 57)
                               (menu-bar-lines . 1) (width . 82)
                               (vertical-scroll-bars . right)))))

(custom-theme-set-faces  'Labo
 '(default ((t (:height 113 :foundry "1ASC"
                :family "Droid Sans Mono Slashed")))))

(provide-theme 'Labo)

My theme is correctly loaded from .emacs: M-x customize-themes shows it checked. M-x describe-variable default-frame-alist gives the correct value (as defined in the theme). But M-x describe-face default gives:

Family: DejaVu Sans Mono
Foundry: PfEd
Height: 98

However, changing the default face by hand in Customize works, so I guess the "Droid Sans Mono Slashed" font is not the culprit.

I'm far from being an Emacs expert. Maybe a loading order issue? The requested font is a TrueType one, placed in ~/.fonts.

There is no error in Messages. How to debug this? Thanks for your help.

1

I had asked the same question on Usenet group fr.comp.applications.emacs on September, 10. I received an answer by "Joseph Girod" on December, 18 which I translate here

The documentation of custom-theme-set-face states you have to either add a non-nil argument after the font specification to tell "now", that is, apply the font immediately, or call function (custom-theme-recalc-face FACE).

Accordingly, I changed the relevant part of my theme into (the foundry specification was useless)

(custom-theme-set-faces
 'Labo
 '(default ((t (:height 113 :family "Droid Sans Mono Slashed")))
           t ))

and it works as expected.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.