private void IterateString(string text, Vector2 Position, bool Draw, float scale, Color4 Color, CoordinateType CoordinateType, out StringMetrics Metrics)
        {
            Metrics = new StringMetrics();
            Vector2 StartPosition = Position;
            float   scalY         = CoordinateType == CoordinateType.SNorm ? -1 : 1;

            foreach (char c in text)
            {
                var CD          = GetCharDescription(c);
                var CharMetrics = CD.ToStringMetrics(Position, scale, scale * scalY);
                if (Draw)
                {
                    if (CharMetrics.FullRectSize.X != 0 && CharMetrics.FullRectSize.Y != 0)
                    {
                        float posY = Position.Y - scalY * CharMetrics.OverhangTop;
                        float posX = Position.X - CharMetrics.OverhangLeft;
                        Sprite.Draw(CD.TableDescription.SRV, new Vector2(posX, posY), CharMetrics.FullRectSize, CD.TexCoordsStart, CD.TexCoordsSize, Color, CoordinateType);
                    }
                }

                Metrics.Merge(CharMetrics);

                Position.X += CharMetrics.Size.X;

                //Break newlines
                if (c == '\r')
                {
                    Position.X = Metrics.TopLeft.X;
                }

                if (c == '\n')
                {
                    Position.Y = Metrics.BottomRight.Y - CharMetrics.Size.Y / 2;
                }
            }
        }
        /// <summary>
        /// Draws the string in the specified coordinate system aligned in the given rectangle. The text is not clipped or wrapped.
        /// </summary>
        /// <param name="text">The text to draw</param>
        /// <param name="Rect">The rectangle in which to align the text</param>
        /// <param name="Align">Alignment of text in rectangle</param>
        /// <param name="RealFontSize">The real font size in the chosen coordinate system</param>
        /// <param name="Color">The color in which to draw the text</param>
        /// <param name="CoordinateType">The chosen coordinate system</param>
        /// <returns>The StringMetrics for the rendered text</returns>
        public StringMetrics DrawString(string text, RectangleF Rect, TextAlignment Align, float RealFontSize, Color4 Color, CoordinateType CoordinateType)
        {
            //If text is aligned top and left, no adjustment has to be made
            if (Align.HasFlag(TextAlignment.Top) && Align.HasFlag(TextAlignment.Left))
            {
                return(DrawString(text, new Vector2(Rect.X, Rect.Y), RealFontSize, Color, CoordinateType));
            }

            text = text.Replace("\r", "");
            var   RawTextMetrics = MeasureString(text, RealFontSize, CoordinateType);
            var   mMetrics       = MeasureString("m", RealFontSize, CoordinateType);
            float startY;

            if (Align.HasFlag(TextAlignment.Top))
            {
                startY = Rect.Top;
            }
            else if (Align.HasFlag(TextAlignment.VerticalCenter))
            {
                startY = Rect.Top + Rect.Height / 2 - RawTextMetrics.Size.Y / 2;
            }
            else //Bottom
            {
                startY = Rect.Bottom - RawTextMetrics.Size.Y;
            }

            var TotalMetrics = new StringMetrics();

            //break text into lines
            var lines = text.Split('\n');

            foreach (var line in lines)
            {
                float startX;
                if (Align.HasFlag(TextAlignment.Left))
                {
                    startX = Rect.X;
                }
                else
                {
                    var lineMetrics = MeasureString(line, RealFontSize, CoordinateType);
                    if (Align.HasFlag(TextAlignment.HorizontalCenter))
                    {
                        startX = Rect.X + Rect.Width / 2 - lineMetrics.Size.X / 2;
                    }
                    else //Right
                    {
                        startX = Rect.Right - lineMetrics.Size.X;
                    }
                }

                var   lineMetrics2 = DrawString(line, new Vector2(startX, startY), RealFontSize, Color, CoordinateType);
                float lineHeight;
                if (mMetrics.Size.Y < 0)
                {
                    lineHeight = Math.Min(lineMetrics2.Size.Y, mMetrics.Size.Y);
                }
                else
                {
                    lineHeight = Math.Max(lineMetrics2.Size.Y, mMetrics.Size.Y);
                }
                startY += lineHeight;
                TotalMetrics.Merge(lineMetrics2);
            }

            return(TotalMetrics);
        }