Can't set free mono font in config

What happened?

I put the following three versions of setting the font in the commandline but to no effect:

(setq doom-font (font-spec :family "FreeMono Bold" :size 20.0))

(setq doom-font (font-spec :family "FreeMono" :size 20 :slant 'normal :weight 'bold))

(setq doom-font (font-spec :family "FreeMono" :size 26 :slant 'normal :weight 'bold))

What did you expect to happen?

I hoped to see a free mono font in bold when I restarted doom. I am able to set the font using menu set font."

Steps to reproduce

set config in ways described above.

System information


Loading data dump...

If FreeMono or FreeMono Bold weren’t working, then those are not their real names.

Run fc-list | grep free in the shell, or peruse the output of fc-list. For example, fc-list | grep JetBrainsMono on my system puts out a lot of lines that look like this:

/nix/store/rwib2mn97anyvj13zvqnjzsbvrhrqihw-JetBrainsMono-2.242/share/fonts/truetype/JetBrainsMono-Italic[wght].ttf: JetBrains Mono:style=Thin Italic
/nix/store/rwib2mn97anyvj13zvqnjzsbvrhrqihw-JetBrainsMono-2.242/share/fonts/truetype/JetBrainsMono-Italic[wght].ttf: JetBrains Mono:style=Medium Italic
/nix/store/rwib2mn97anyvj13zvqnjzsbvrhrqihw-JetBrainsMono-2.242/share/fonts/truetype/JetBrainsMono[wght].ttf: JetBrains Mono:style=ExtraBold

But they tell me the name of the font (as fontconfig recognizes it) is JetBrains Mono. That is what I’d have use in Emacs.

Hmm. Here is the relevant bits of what fc-list shows me. It seems that FreeMono is correct, but my code in the config file still doesn’t work.

/usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf: FreeMono:style=Bold Oblique,получерен наклонен,Negreta cursiva,tučné kurzíva,fed kursiv,Fett-Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,gros oblic,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,huruf tebal miring,жирний похилий,polkrepko ležeče,treknais slīpraksts,pusjuodis pasvirasis,Lodi etzana,धृष्ट-तिरछा

/usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf: FreeMono:style=Oblique,наклонен,cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,oblic,Курсив,İtalik,huruf miring,похилий,ležeče,slīpraksts,pasvirasis,nghiêng,Etzana,तिरछा


/usr/share/fonts/truetype/freefont/FreeMono.ttf: FreeMono:style=Regular,нормален,normal,obyčejné,Standard,µεσαία,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,menengah,прямій,navadno,vidējs,normalusis,thường,Arrunta,सामान्य

/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf: FreeSans:style=Oblique,наклонен,negreta cursiva,kurzíva,kursiv,Πλάγια,Cursiva,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,kursywa,Itálico,oblic,Курсив,İtalik,huruf miring,похилий,Ležeče,slīpraksts,pasvirasis,nghiêng,Etzana,तिरछा
/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf: FreeMono:style=Bold,получерен,negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,gros,Полужирный,Fet,Kalın,huruf tebal,жирний,polkrepko,treknraksts,pusjuodis,đậm,Lodia,धृष्ट

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