protected virtual SpatialTextMetrics CreateMetrics(SpatialText text) { var letterCount = text.Text.Length; var averageLetterHeight = text.Area.Size.Height / letterCount; var averageLetterWidth = text.Area.Size.Width / letterCount; if (averageLetterHeight == 0) { averageLetterHeight = 1; } if (averageLetterWidth == 0) { averageLetterWidth = 1; } return(new SpatialTextMetrics { AverageLetterHeight = averageLetterHeight, AverageLetterWidth = averageLetterWidth }); }
protected override SpatialTextMetrics CreateMetrics(SpatialText text) { return(_spatialTexts[0].Metrics); }