Closed drcxd closed 2 years ago
It is odd that the Mono version works and the regular one does not as they are practically the same file.
Out of interest, did you previously install a version of Cascadia Code on the system? Sometimes when you upgrade your font, there can be a cache-related issue wherein the OS struggles to locate the new version. If so, I'd suggest removing the font, clearing all font caches, and then re-installing.
I install Cascadia Code by placing the .ttf files in ~/.local/share/fonts
, then I execute fc-cache -fv
.
I uninstall it by removing the .ttf files from ~/.local/share/fonts
and execute fc-cache -fv
. Does this process clear all font caches?
Unfortunately I cannot advice on that as I'm unfamiliar with linux, and the distro that you use. I trust you can investigate? :)
I tried to reproduce the bug and can confirm an issue, although in my case it's the Mono font that's missing the normal-normal-normal variant and Emacs picks normal-italic-normal instead. I can also see a similar issue with the variable version of the Roboto Mono font. As I understand it Emacs has its own font handling parts so the issue could lie with the program itself.
I tried to reproduce the bug and can confirm an issue, although in my case it's the Mono font that's missing the normal-normal-normal variant and Emacs picks normal-italic-normal instead. I can also see a similar issue with the variable version of the Roboto Mono font. As I understand it Emacs has its own font handling parts so the issue could lie with the program itself.
Thanks for youre help, I'll investigate further.
I was having this problem on Debian 11, with Emacs 27.1.
It turns out that I had installed the variable fonts, instead of the static ones. KDE seemed find with the variable ones, but Emacs did not. Installing the static ones worked out for me.
Still not sure where the root cause lies, but this got me working.
Recently I found that Emacs 29 could recognize the variable fonts correctly. With Emacs 28, I still need to use the static ones.
Cascadia family version
2108.03
Cascadia family variant(s)
Cascadia Code (the version with ligatures)
Font file format(s)
.ttf (variable)
Platform
Windows Subsystem for Linux 2, kali-linux
Other Software
GNU Emacs 27.2(x86_64-pc-linux-gnu, GTK+ Version 3.24.24)
What happened?
It looks like Emacs in Linux cannot use normal weight Cascadia Code.
My Emacs configuration about fonts:
After I launch Emacs, I found that the font actually takes effect is
The
light
indicates the weight of the font. I tried to manually set the weight as normal, but it does not work:Using the font manager, I can see that the normal weight Cascadia Code is installed and could be displayed correctly.
Another thing worth mentioning is that by executing the Emacs command/function
set-frame-font
, Emacs will prompt candidates fonts. I can see that there is a font named...Cascadia-Mono-normal-normal-normal...
but there is no Cascadia Code correspondence, and if I set the normal weight Cascadia Mono font, I can tell the weight is correct (normal rather than light).Now the font taking effect is