Hot answers tagged

3

Try buffer-face-set, which accepts either a face name like (buffer-face-set "error") or a property list of face attributes and values like (buffer-face-set :weight 'bold :height 150). I think your specific example would be something like (buffer-face-set :font-family "American Typewriter" :height 150). You can M-: and at the "Eval:" prompt enter one of ...


3

You specify a font in XLFD-style, which normaly consits of 14 parts (specifiers between the -). But your font has 15 parts and this is wrong. The problem lies here: SimSun-ExtB. I think this should specify the family (fmly), but the - makes ExtB to be evaluated as weight (wght) and this is wrong. To use this font anyway, you could try to specify this font ...


2

I don't know if this is the best way to do it, but you can loop over all faces and set their height to 1.0, which means to use the same height as the default face: (cl-loop for face in (face-list) do (unless (eq face 'default) (set-face-attribute face nil :height 1.0))) I think this won't affect faces created after the loop runs, so it ...


2

How about this: char-displayable-p is an autoloaded compiled Lisp function in `mule-util.el'. (char-displayable-p CHAR) Return non-nil if we should be able to display CHAR. On a multi-font display, the test is only whether there is an appropriate font from the selected frame's fontset to display CHAR's charset in general. Since ...


2

The following seems working: (seq-filter (lambda (font) (when-let ((info (font-info font))) (string-match-p "spacing=100" (aref info 1)))) (font-family-list)) ;; => ("Andale Mono" "Courier" "Courier New" "GB18030 Bitmap" "Input" "Menlo" "Monaco" "PT Mono" "Source Code Pro" "Apple Braille" "Apple ...


2

In Emacs the appearance of certain text is controlled using something called "faces". You should learn about faces and how to change them by reading the documentation. To quickly change how something looks you can often put point (aka the cursor) on that thing that you want to change and then type M-x customize-face. That will often offer you the ...


2

Or you can use Emacs terminal (emacs -nw) on a terminal emulator that support color emoji. Edit: Emacs can be run as GUI or terminal application. To start emacs terminal, open your terminal emulator (iTerm or iTerm2 in MacOS, Mate-Terminal or Gnaome-Terminal in Linux) and run the command emacs -nw in the terminal emulator. When running in terminal mode, the ...


1

With respect to what you tried using set-face-attribute: The error message tells you that the first argument needs to be a symbol. At that point you should use C-h f set-face-attribute, which tells you that the first argument needs to be a face. Here's an example of its use. (set-face-attribute 'default nil ':font "American Typewriter" ':height 150) That ...


1

I use it as buffer local by # Local Variables: # eval: (setq buffer-face-mode-face '(:family "American typewriter" :height 150)) # eval: (buffer-face-mode t) # End: Change :height to what you want.


1

If you happen to be using spacemacs, the theming layer supports overriding themes. Add theming to dotspacemacs-configuration-layers Add this to dotspacemacs/user-init substituing zenburn for the theme in question: (setq theming-modifications '((zenburn (org-level-1 :height 1.0) (org-level-2 :height 1.0) (org-level-3 :height 1.0) ...


1

See the text-scale-increase function: text-scale-increase is an autoloaded interactive compiled Lisp function in face-remap.el. (text-scale-increase INC) Increase the height of the default face in the current buffer by INC steps. If the new height is other than the default, text-scale-mode is enabled. Each step scales the height of the ...


1

In file .XdefHiDPI, add the following line, adapting for your preferred font and size. I use the Hack TTF font at 14 point on a normal-resolution display. emacs*font: Hack-14 See: (info "(emacs) X Resources") and https://sourcefoundry.org/hack/


1

Your question title speaks about the command line. This answer instead talks about setting the font size in Emacs. zoom-frm-in is a command in Emacs-Lisp library zoom-frm.el. It's purpose is to zoom inward interactively. It sounds like you don't want to zoom in interactively but you instead want to start Emacs at the right zoom level - in other words, set ...


1

Emacs uses/defines/handles fonts in ways that you might not be used to. Fonts are treated as attributes of Faces (Emacs Manual: Faces). A Face has several attributes (Emacs Manual: Face Attributes), colors, over/under line, strike-through, size, generic font specification, specific font specification, etc. For your purposes I think you want the :font ...


1

In Elisp programs the following form does the trick for the text in the current region. (add-face-text-property (region-beginning) (region-end) '(:height 200)) Replace 200 with the number of your choice. This only works for buffers without font-lock. If font-lock is active you need to add the :size face attribute via font-lock-add-keywords.


1

A glance on org-export--dispatch-ui shows that org-export--dispatch-action is the action right after generating the dispatch buffer. The function org-export--dispatch-action already handles the key-presses for the export options. Therefore you have no other choice than to put the font setting function before org-export--dispatch-action with the help of an ...


1

Library mouse3.el gives you what you request: a context-dependent right-click popup menu that's configurable. See Mouse3 for a complete description, screenshots, and details. By default such menus are region-related if the region is active, and it is global and click-position-related if not.


1

The following will set the default fonts in your GUI Emacs and XTerm to "DejaVu Sans Mono" which is fairly common and has nice looking Latin and Arabic glyphs. For your XTerm, and using uxterm a wrapper around xterm, add the following to the end of your ~/.Xresources: UXTerm*faceName: xft:DejaVu Sans Mono:size=10 Then run xrdb -merge ~/.Xresources. This ...


1

Add (set-frame-font "DejaVu Sans Mono-14" nil t) to your init.el file. This would affect all frames (last parameter t). If you're not sure about the font name, you can see a list of all available fonts by evaluating this (message (mapconcat (quote identity) (sort (font-family-list) #'string-lessp) "\n")) in your *scratch* buffer. Check the ...


1

Try to add the following to your init.el file and change the font family and height to whatever you want. (defun my/setup-frame (&optional frame) "Configure look of FRAME. If FRAME is nil, configure current frame. If non-nil, make FRAME current." (when frame (select-frame frame)) (when (window-system) (set-face-attribute 'default nil :height ...


1

As DoMiNeLA10 suggested, it was related to faces in my init file. Removing that solved the problem in my system. The line causing the issue was: (set-face-attribute 'default nil :family "Menlo" :height 120)


1

Emacs has changed on its way from 24 to 26 its mind on what the forced size "18" means in your initial-frame-alist. In your examination the size is 18 in both cases, and the 26 screenshot looks a bit more like it would be 18 pixels. I use (add-to-list 'default-frame-alist '(font . "Anonymous Pro-12")) to setup my emacsframe and I guess if you use "...


1

No, I don't believe that there is any way to turn off glyph fallbacks. Of course I could be wrong; this is supported only by a brief examination of the Emacs code. I looked in fontset.c which has the code for this. Specifically, the function fontset_find_font searches a fontset for the font information for a specific character. It does take a boolean ...


Only top voted, non community-wiki answers of a minimum length are eligible