....which AFAICS is just about the same as using a headless's Graphics, but less hassle but less elegant
FWIW, FontRenderContext doesn't work on Linux without a Graphics to come from (although this may be my fault). The docs imply that it SHOULD work, but that it will be "inaccurate" because e.g. fractional font metrics calcs will be slightly inaccurate.
In practice, it seems to just arbitrarily returns "1" for the width of all text, and other brain-dead stuff.
I've not tried very hard to get it to work, since it's giving me deja-vu of trying to create Image's without any GUI code in 1.1.x - when I finally achieved success, I just crashed the VM every time, because without a GUI there's no native callback for preparing valid mem etc, IIRC. Had to wait rather a lot of years for the headless displays instead