Calibre has a long-established use of the word "Layout", and this has nothing to do with that use of the word.
I suggest you rename the plugin to something like "Viewer Font Metrics and Themes". When you do that, I can change the thread name for you.
Could you do whatever is needed to persist the window size.
BR