3

With Linux/X11, certain font's show without anti-aliasing.

  • JetBrains Mono
  • Cascadia Code

  • These two fonts show with anti-aliasing in other programs (st terminal for example).

  • All other fonts show with anti-aliasing (Source Code Pro, Fira Code Medium, Courier Code, Monoid).

  • This is the feature-set of emacs XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2


Any hints on how to resolve this?

This is X11 with JetBrains Mono-13 font, I think this is related to Emacs, not fontconfig, since the st terminal displays the font properly.

Emacs in X11 with JetBrains Mono-13 font

This is emacs -nw running in st terminal.

enter image description here

3
  • Which build variant of Emacs is this? Specifically, are you using Cairo and Harfbuzz? (check system-configuration-features to find out).
    – rpluim
    Jan 24, 2020 at 14:30
  • In case this isn’t obvious, this isn’t what emacs is supposed to look like. Jan 24, 2020 at 22:51
  • Updated with system-configuration-features and a screenshot of the same font in st.
    – ideasman42
    Jan 25, 2020 at 3:49

1 Answer 1

3

Found a solution, neither of these fonts define themselves as mono-spaced, the solution is to force this.

This can be done in fonts.conf or through the font specifier.

  • Cascadia Code-13:spacing=90 (dual spacing)
  • JetBrains Mono-13:spacing=100 (mono spacing)

Modifying the fonts.conf is meant to work too, although I couldn't get it working. See link.

2
  • You're using an XFT build. Lots of font-related things, especially with newer fonts like JetBrain Mono, tends to work a lot bettwe in a Cairo+Harfbuzz build.
    – rpluim
    Jan 26, 2020 at 20:59
  • From what I've read Cairo build is currently unstable (as of Emacs 26)
    – ideasman42
    Feb 18, 2020 at 22:51

Your Answer

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

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