calculate minimal bounding boxes for text (correctly)