private static TransformViewport OrthogonalTransform(out float fontScale)
{
bool isOrthog;
float left,right,bottom,top;
ProjectionStack.GetCurrentOrthogProjection(out isOrthog,out left,out right,out bottom,out top);
if (!isOrthog)
throw new ArgumentOutOfRangeException("Current projection matrix was not Orthogonal. Please ensure that you have set an orthogonal projection before attempting to create a font with the TransformToOrthogProjection flag set to true.");
var viewportTransform = new TransformViewport(left, top, right - left, bottom - top);
fontScale = Math.Abs((float)ProjectionStack.CurrentViewport.Value.Height / viewportTransform.Height);
return viewportTransform;
}