With doom emacs, I have the following in my config.el
(setq doom-font (font-spec :family "JetBrains Mono" :size 16)
I evaluated it manually without any error, and M-x doom-reload-font, then I got the error:
Font not available: #<font-spec nil nil JetBrains\ Mono nil nil nil nil nil 16 nil nil nil nil>
and the desired font was not used in the emacs session. (With the above configuration, when starting doom emacs, I got the same error, which aborted the starting up the emacs session.)
I checked my \~/.font directory, there are many font files that may match the specification.
Furthermore, this problem only occur with certain unknown packages' upgrade, as the configuration used to work before the upgrade.
Here are some samples of the fonts relevant that are available.
ls -lt ~/.fonts/JetBrainsMono*
-rwxrwxrwx 1 yshen yshen 68064 Oct 22 2021 /home/yshen/.fonts/JetBrainsMono-Thin.woff2*
-rwxrwxrwx 1 yshen yshen 71180 Oct 22 2021 /home/yshen/.fonts/JetBrainsMono-ThinItalic.woff2*