I wnet with estimating it from the character size times a global constant (see code). It is not that senstitive to size really. It just needs to be several times larger than the unit.