private void DynamicFontSizeApply(Graphics graphics)
        {
            var minFontSize = 0;
            var maxFontSize = Height;
            int fontSize    = Height / 2;

            while (minFontSize != maxFontSize)
            {
                var fontFamilyAttempt = new FontFamily(Font);
                var fontAttempt       = new Font(fontFamilyAttempt, fontSize, FontStyle);
                var fontToolAttempt   = new FontTool(graphics, fontAttempt, FontStyle, fontFamilyAttempt);
                var measurement       = fontToolAttempt.Measure(Content);
                if (measurement.Width > Width || measurement.Height > Height)
                {
                    maxFontSize = fontSize - 1;
                }
                else
                {
                    minFontSize = fontSize;
                }
                fontSize = (int)(Math.Ceiling((decimal)(maxFontSize - minFontSize) / 2) + minFontSize);
            }
            var fontFamily     = new FontFamily(Font);
            var font           = new Font(fontFamily, fontSize, FontStyle);
            var fontTool       = new FontTool(graphics, font, FontStyle, fontFamily);
            var backgroundTool = new BackgroundTool(graphics, BackgroundColor, BackgroundBorderColor, BackgroundBorderThickness);
            var textBlock      = new TextBlock(Width, LineAlignment, WordAlignment, fontTool, backgroundTool);

            textBlock.Add(new CharacterSequence(Content, Color, OutlineColor, OutlineThickness, fontTool), fontTool, backgroundTool);
            Finalize(graphics, textBlock);
        }
        public CharacterSequence(string content, Color color, Color outlineColor, int outlineThickness, FontTool fontTool)
        {
            _content          = content;
            _fontTool         = fontTool;
            _primaryBrush     = new SolidBrush(color);
            _hasOutline       = outlineColor.A != Color.Transparent.A && _outlineThickness > 0;
            _outlineBrush     = new SolidBrush(outlineColor);
            _outlineThickness = outlineThickness;
            var size = _fontTool.Measure(_content);

            Width  = size.Width;
            Height = _fontTool.LineHeight;
        }