IntelliJ-Inspection-Lens icon indicating copy to clipboard operation
IntelliJ-Inspection-Lens copied to clipboard

Add font settings

Open Lzyct opened this issue 7 months ago • 4 comments

Is it possible to add configuration to change the font?

Thanks

Lzyct avatar Jul 02 '25 10:07 Lzyct

No, the only font configuration the IntelliJ SDK allows is the "Use editor font" option the plugin already has.

chylex avatar Jul 02 '25 13:07 chylex

How about adjusting the font size? Because in my case the text size from the plugin is smaller than the editor font size

Lzyct avatar Jul 02 '25 13:07 Lzyct

The inlay font is always 1 size smaller than the original font. You can compare it with Code Vision hints for example, they're the same.

One possibility is if JetBrains added better customization for inlay hints. They've had requests for user-facing font customization in inlay hints for several years, but there seems to be no progress.

Another possibility is if I copied the whole inlay rendering implementation. This would allow some font customization, but not complete freedom because you can't render anything outside the line boundaries. If the font was too large, it would leave behind rendering artifacts; I already ran into this trying to render underlines. It would also mean that the plugin gets more complex, its inlays would look inconsistent next to other inlay hints, and any improvements JetBrains makes to inlay rendering would not apply anymore.

I would prefer if JetBrains made inlay fonts customizable on their end, but I may look into doing it on the plugin side if there's enough interest.

chylex avatar Jul 02 '25 13:07 chylex

Ah, I see Thank you @chylex

Lzyct avatar Jul 02 '25 14:07 Lzyct