Closed Eason0210 closed 2 years ago
I don't have Windows to test, but one issue is that icons are rendered and cached. So if you change the font, you should M-x kind-icon-reset-cache
to get an accurate idea. What this may do, however, is demonstrate that the problem happens for all fonts.
If that is the case, it's probably then a bug in svg-lib
rendering of full height icons. Or, perhaps your Emacs is confused about its (window-font-height)
(misleading svg-lib
).
You should be able to work around this by reducing the :height
in kind-icon-default-style
to something smaller, like 0.8. Give that a try.
You should be able to work around this by reducing the
:height
inkind-icon-default-style
to something smaller, like 0.8. Give that a try.
Thanks for you advice. I tried to customize the :height
to 0.9 and it works well now.
(custom-set-variables
'(kind-icon-default-style
'(:padding 0 :stroke 0 :margin 0 :radius 0 :height 0.9 :scale 1.0))
'(package-selected-packages '(kind-icon corfu)))
Using the font SF Mono
Hi @jdtsmith
When I use
kind-icon
withCorfu
on Windows system, the popup window can't show all the icons, the last candidate will be cut. This issue only happen on Windows system, but with different fonts will have different result. I only test these fonts:SF Mono
,Cascadia Mono
andConsolas
Using
SF Mono
, the last candidate is cut, and the candidates only have 9 lines, expected is 10:Using
Consolas
, the candidates have 10 lines, but the last candidate is cut:Using
Cascadia Mono
, the result looks good , but the candidates only have 9 lines, expected is 10:If I use the text-based icon, It works well.
Steps to reproduce:
~/.emacs.d/init.el
init.el
file;; Setup corfu (package-install 'corfu) (require 'corfu) (setq corfu-auto t) (global-corfu-mode 1)
;; Setup kind-icon (package-install 'kind-icon) (require 'kind-icon) (setq kind-icon-default-face 'corfu-default) (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)