Problem with bold fonts

What happened?

Emacs does not use (some) bold fonts.

What did you expect to happen?

Emacs uses bold fonts when required by the 'bold face attribute.

Steps to reproduce

  1. Use, for example, (setq doom-font "-*-Fira Code-*-*-*-*-14-*-*-*-m-*-*-*") or (setq doom-font "-*-JetBrains Mono-*-*-*-*-14-*-*-*-m-*-*-*)".
  2. Check bold font, for example, an Org headline.
  3. Observe the font used (e.g., with SCP u g a).
    ftcrhb:-JB-JetBrains Mono-*-normal-normal-*-14-*-*-*-m-0-iso10646-1 (#x14C)
    
    (notice the width type normal, although it should be bold).

Fonts are correctly installed here. I can see all width types using describe-font. I can even set an Emacs-wide bold font using, e.g., (setq doom-font "-*-JetBrains Mono-bold-*-*-*-14-*-*-*-m-*-*-*)".

Even better, the bold fonts are used when I use a font without ligatures, for example, Fira Mono instead of Fira Code: (setq doom-font "-*-Fira Mono-*-*-*-*-14-*-*-*-m-*-*-*")

I am confused.

System information

generated  Mar 01, 2023 11:36:21
system     NixOS 23.05.20230228.de098f6 (Stoat) Linux 5.15.96 x86_64 x
emacs      28.2 ~/.config/emacs/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master 5c563d307 2023-02-25 20:47:29 -0500
           ~/.config/doom/
shell      /run/current-system/sw/bin/bash
features   CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF
           LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY
           PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D
           XDBE XIM XPM LUCID ZLIB
traits     gui server-running envvar-file custom-file
custom     safe-local-variable-values
modules    :config use-package :completion (company +childframe) (vertico +icons) :ui
           doom doom-dashboard doom-quit hl-todo ligatures modeline ophints (popup
           +defaults) (treemacs +lsp) (vc-gutter +pretty) vi-tilde-fringe :editor
           (evil +everywhere) (format +onsave) multiple-cursors snippets :emacs dired
           electric undo vc :term vterm :checkers syntax (spell +hunspell +everywhere
           +flyspell) grammar :tools biblio direnv (eval +overlay) (lookup
           +dictionary) lsp (magit +forge) make pass tree-sitter :lang (cc +lsp
           +tree-sitter) data emacs-lisp (haskell +lsp) (java +lsp) (json +lsp) (latex
           +lsp) markdown (nix +lsp) (org +dragndrop +hugo +roam2) (python +lsp
           +tree-sitter) (rust +lsp) (sh +lsp +tree-sitter) (web +lsp) (yaml +lsp)
           :email mu4e :config (default +bindings +smartparens)
packages   (biblio) (emacsql :built-in 'prefer) (emacsql-sqlite :built-in 'prefer)
           (khardel) (mediawiki) (openwith) (smali-mode :recipe (:host github :repo
           strazzere/Emacs-Smali :files (smali-mode.el) :nonrecursive t)) (systemd)
           (unfill)
unpin      lsp-mode rustic
elpa       vterm emacsql-sqlite emacsql
1 Like

I’m also experiencing the same problem.

For your reference, I have created an issue at the GitHub repo:

FYI, rendering of bold fonts works again here. No idea what the problem was.

After a recent Nixpkgs and doom sync -u update, the problem is back.

Updating Emacs to the unstable version solved this issue. Weird that font problems make it to the stable version…

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.