public SizeF MeasureString(string text, Font font) { font.ComputeExtent(text, out var width, out var height); return(new SizeF(width, height)); }