How can I be notified when a user has changed the font size?

Answered

Hi I'm developing a jetbrains plugin. How can I be notified when a user has changed the font size? Which listener should I use? Thanks for any help!

0
3 comments

What font are you referring to? Editor Font? UI Font?

0

Thank you for fast reply!

Yes,the Edior Font

I asked gpt4 it says there is no listener to use, and it suggests to use a timertask check the font size every second…

0

Not sure what problem you want to solve here.

You can attach listener to each Editor instance

com.intellij.openapi.editor.ex.EditorEx#addPropertyChangeListener(java.beans.PropertyChangeListener, com.intellij.openapi.Disposable)

and react to property change for

com.intellij.openapi.editor.ex.EditorEx#PROP_FONT_SIZE

0

Please sign in to leave a comment.