Getting font size before initializing graphics

BlitzMax Forums/BlitzMax Programming/Getting font size before initializing graphics

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm writing an app that mimics a text window: N columns x M rows of characters of a fixed-width font. I want the window size to be a perfect multiple of the font width and height, so I need to get those values before the Graphics call. Unfortunately, you can't use TextWidth and TextHeight until *after* the graphics system is initialized.

The only option I've come up with is to initialize graphics, get the font measurements, close the graphics device, then re-open it again with the proper window size. This is ugly :)