0

I am trying to restore the face scaling functionality I had in previous versions of Emacs.

On Ubuntu 22.04, Emacs (not 30!) master branch d4d6830f8a0. Tested on tag emacs-29.2 with the same result.

I installed terminus like this:

sudo apt install xfonts-terminus

My init file does this:

(when (member "Terminus" (font-family-list))
  (set-frame-font "Terminus:size=18" nil t)
  (add-to-list 'default-frame-alist '(font . "Terminus:size=18")))

No matter what size I set, my emacs buffers always look the same. I've try to write height instead of size, no difference.

How do I change the size of my emacs face? Do I need to install different font sizes at system level?


Edit: I previously set the default face like this:

(when (member "Terminus" (font-family-list))
  (set-frame-font "-xos4-Terminus-normal-normal-normal-*-12-*-*-*-c-60-iso10646-1")
  (add-to-list 'default-frame-alist '(font . "-xos4-Terminus-normal-normal-normal-*-12-*-*-*-c-60-iso10646-1")))

If I replace 12 with 18, I do get a difference. text-scale-decrease does have an effect then, but it's weird, the decrement/increments are very small, not all characters are supported, it sometimes switches to italics... Which makes me think that this is not the correct way.

2
  • Just to be clear, you're not running Emacs in a terminal are you? You're using GUI Emacs frames?
    – phils
    Commented Mar 20 at 8:48
  • @phils Correct!
    – Gauthier
    Commented Mar 20 at 13:25

1 Answer 1

1

Terminus is a bitmap font; it only supports specific sizes. If you want a font that can scale to any arbitrary size, find a vector (TrueType or OpenType) font that you like.

From the package description:

This package contains normal and bold fonts in the following sizes: 6x12, 8x14, 8x16, 10x20, 11x22, 12x24, 14x28 and 16x32 and supports the following encodings: ISO10646-1, ISO8859-1, ISO8859-2, ISO8859-5, ISO8859-9, ISO8859-13, ISO8859-15, ISO8859-16, KOI8-R, KOI8-U, CP1251 and PT154.

Also from the description:

Note: You might want to use the package fonts-terminus-otb instead of this package because the fonts in this package are used by the X server directly. Several modern applications will ignore such fonts.

Emacs won't ignore server–side fonts, but while it does install OpenType fonts they’re still bitmap fonts and not vector fonts.

9
  • Thanks, this is probably my problem. I installed fonts-terminus-otb, but could not find it later in (font-family-list). Not sure why not.
    – Gauthier
    Commented Mar 20 at 16:17
  • Presumably they’re the same font family and font name. It’s just that one is in PCF format which the X server can load, and the other is in OpenType format that Emacs can load directly but the X server cannot.
    – db48x
    Commented Mar 20 at 17:10
  • Ok! So what is the implication in my case, that the terminus-otb version is in practice not usable for me either?
    – Gauthier
    Commented Mar 21 at 13:00
  • You just need to use a different font.
    – db48x
    Commented Mar 21 at 14:15
  • Not the response I was hoping for :) No hope for terminus? Or other fonts without aliasing?
    – Gauthier
    Commented Mar 21 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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