Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Getting the editor font
Permanently deleted user
Created
Is there any way to get the current user-selected font? I need to set it on some text fields in inspection options panels, but don't see any reasonable API.
Is there any way to get the current user-selected font? I need to set it on some text fields in inspection options panels, but don't see any reasonable API.
I'm not sure if it'll work or not, but you could try
editor.getContentComponent().getFont()
It'd be the first place I'd look, anyway. I don't think the general IDE settings are open.
Otherwise, you could try parsing Idea's XML configuration file directly. I can't immediately see the editor font in there - only the main (non-monospaced) IDE font.
Dave Griffith wrote:
I'm not sure if it'll work or not, but you could try
editor.getContentComponent().getFont()
It'd be the first place I'd look, anyway. I don't think the general IDE
settings are open.
Otherwise, you could try parsing Idea's XML configuration file
directly. I can't immediately see the editor font in there - only the
main (non-monospaced) IDE font.
- Paul
This will not work.
And necessary API is not open, sorry.
--
Best regards,
Maxim Shafirov
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"