• My theme's default face is ignored

    From Lucas Levrel@21:1/5 to All on Fri Sep 21 18:18:38 2018
    Hi,

    (This question was first asked in fr.comp.applications.emacs, then on stackexchange, with no luck. I'm hoping to find here a knowledgeable guru, because I'm very lost !)

    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 Messag
  • From jfr@tin.org@21:1/5 to All on Sat Sep 22 19:29:58 2018
    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.

    # update fonts.dir,fonts.scale
    mkfontscale ~/.fonts
    mkfontdir ~/.fonts

    #change the font path
    xset +fp ~/.fonts
    xset fp rehash

    and try

    emacs -fn fontname

    The names are in fonts.dir

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lucas Levrel@21:1/5 to All on Tue Sep 25 16:35:03 2018
    Addendum: the problem is not specific to theming. Setting the default face
    to "Droid Sans Mono Slashed" in .emacs doesn't work either.

    Le 22 septembre 2018, à 19:29, jfr@tin.org a écrit :
    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.

    Thank you for helping me. Now this is getting strange:

    If I do only this:

    # update fonts.dir,fonts.scale
    mkfontscale ~/.fonts
    mkfontdir ~/.fonts

    Then run emacs, the theme's font setting is applied. I can stop and start
    emacs several times, it works.

    *But* at the next login, this will not work anymore! I can make it work
    again by... removing fonts.dir and fonts.scale! This somehow "awakens"
    some part of X, because the display of other apps (Zim, Xfce Terminal)
    which use a different font (DejaVu) is altered (somewhat shrinked) when I remove these files.

    These commands:

    #change the font path
    xset +fp ~/.fonts
    xset fp rehash

    don't help in any case.

    This:

    emacs -fn fontname

    always works, even without fonts.* files or invoking xset. So I can
    workaround the problem by manually setting the theme's font, but this
    doesn't solve or explain the issue...

    --
    LL
    Ἕν οἶδα ὅτι οὐδὲν οἶδα (Σωκράτης)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)