![]() (set-face-attribute 'variable-pitch :family "Liberation Sans") (set-face-attribute 'fixed-pitch-serif nil :family "Monaco") You could put the following in your init file. There are two functions you can use to set faces directly. These faces, fixed-pitch-serif and variable-pitch are not defined in terms of the default face, but can be set like any other face, via the customize facility ( M-x customize-face RET ) or directly. (I don't recommend setting it to a monospace font, like Monaco, but it's your Emacs.) If you want to change it in Emacs, set the face variable-pitch. (Locally, I have "Sans Serif" set to "DejaVu Sans".) This should be set to your liking in your DE so that you have a consistent look across your DE. This is a fontconfig generic font family that your system should set. The face variable-pitch is defined in as the font family "Sans Serif". From here we get info-title-2 -> info-title-3 -> info-title-4 -> variable-pitch. Doing C-u C-x = again we get info-title-1. The second example (from your comment) was the header. Setting fixed-pitch-serif to use the :family of Monaco worked perfectly fine. Manipulating this variable to redefine Monospace Serif to include your choice of Monaco gave me no results. This defined in a a customizable variable face-font-family-alternatives in faces.el. This generic font family (a la "monospace", "sans serif" and "serif") is an Emacs-ism. In turn, you'll find that fixed-pitch-serif is defined as using the Monospace Serif family. Drilling into the Info-quoted face, you'll see it inherits from fixed-pitch-serif. If you C-u C-x =, you'll see this text is in the Info-quoted face. The first, the pink-highlighted-quoted text. You list two specific points in your example. Note, I worked through the following with emacs 26.1 built from source with GTK3 and fontconfig support on Ubuntu 18.04 Of the 350 or so faces defined in my current session, almost all are Menlo derived. load my chosen theme, which then sets faces as it needs.clear the default-frame-alist (Aquamacs does (did?) some stuff there that I don't like).(load-theme 'sanityinc-tomorrow-bright t) Boiling down the font stuff in my init file I have: (set-frame-font "Menlo:size=12") Make sure you're getting your font everywhere.Using X11? Make sure there's nothing screwy in your user and system Xdefaults or Xresources.Emacs will uses these if other more specific fonts aren't defined. Make sure the generic fonts ("serif" "sans" (or "sans serif") and "monospace") for your OS/desktop are set to fonts you like.If I was in your current situation though I'd do the following. You can then use M-x customize-face RET "face name" to customize that face. Instead, if you find a stray face that you don't like, use the key-chord that recommended ( C-u C-x =) to find the face name and its current font. I recommend against doing that for every. Clicking on the face name will bring you to the customize facility where you can view or edit the face to your whims. You'll get a list of face names on the left, and abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ styled according to the face on the right. To see a list of all (currently defined) faces do: Meta- x list-faces-display RET. In fact, this is what you're doing (under the hood) when you specify a font in default-frame-alist you're setting the :font attribute of the default face, default-face. ![]() For your purposes I think you want the :font attribute. A Face has several attributes ( Emacs Manual: Face Attributes), colors, over/under line, strike-through, size, generic font specification, specific font specification, etc. Fonts are treated as attributes of Faces ( Emacs Manual: Faces). Emacs uses/defines/handles fonts in ways that you might not be used to. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |