BGUI - How to set font size to be relative to window size?

Hey. So I’m using the BGUI GUI Python module for the BGE, which is great, but I’m having a problem figuring out exactly how to set the font size (point size) to be relative to the window size. I can get the window size, but I’m not sure exactly how to get the result of the font staying the same size on-screen, no matter the window’s width (I’m not really concerned about height).

Bgui normalizes font sizes based on the screen height. If you want to disable this (to get exact point values), then you need to set your System’s normalize_text to False.

Wait, so BGUI does it automatically? Is it possible to do this based on width instead of height (or a combination of the two)? The reason I ask is because if you resize the window, the fonts don’t change size to still fit in the message box at the predefined point size (40 for me).

The normalizing is done based on the initial screen height. Right now, it’s never recalculated.

Oh, okay. Hm. Maybe I’ll see if I can adapt it to add screen width, too. Thanks.

EDIT: Not much use to adapting it to screen width if it already works by height. This normalization is done when the System is created, right? So, if I create a new system whenever the window is resized (or switches to full-screen mode), the normalization will work correctly? Alternatively, could there possibly be a Recalculate function that you can call when the screen is resized?