Closed drcxd closed 2 years ago
I have the similar problem (Windows 10 too) , as shown in the picture, the code
part is different as the default font, the rest is same as default.
It turns out that lsp-ui-doc uses markdown-code-face
to render part of the content in the tooltip. I am not sure why on Windows this face is displaying another font and rendering using GDI rather than harfbuzz.
To fix this problem, I mean the annoying different font face, rather than the difference between OSes, I just manually customize the markdown-code-face
.
(require 'markdown-mode)
(set-face-attribute 'markdown-code-face nil
:family "Cascadia Code")
@cabins Hope this could help you.
Yes ! It works! Thank you so much!
Another way, as I add these two line to my init file, each font looks great! No only the lsp-tooltip, but also the font in some other mode, such as org-mode, markdown-mode etc.
(set-face-attribute 'fixed-pitch nil :family "Cascadia Code")
(set-face-attribute 'variable-pitch nil :family "Cascadia Code")
Maybe this can give other people some hint.
As you can see in the picture, the font used in lsp-ui tooltip is different. Also, the information displayed at the bottom is using the same (different) font.
This is a windows specific issue, which cannot be found in a Linux environment.
Is there any way I can specify which font I want to use for lsp-ui?