/// <summary>
        ///
        /// </summary>
        /// <param name="pixelsPerDip"></param>
        /// <param name="tf"></param>
        /// <param name="st"></param>
        /// <param name="node"></param>
        /// <param name="compilation"></param>
        /// <param name="fontSize"></param>
        /// <param name="pDebugFn"></param>
        /// <returns></returns>
        public static CustomTextSource4 CreateAndInitTextSource(double pixelsPerDip,
                                                                Typeface tf, SyntaxTree st, SyntaxNode node, Compilation compilation, double fontSize,
                                                                RoslynCodeBase.DebugDelegate pDebugFn)

        {
            if (st == null)
            {
                st          = SyntaxFactory.ParseSyntaxTree("");
                node        = st.GetRoot();
                compilation = null;
            }

            var textDecorationCollection = new TextDecorationCollection();
            var typeface      = tf;
            var fontRendering = FontRendering.CreateInstance(fontSize,
                                                             TextAlignment.Left, textDecorationCollection,
                                                             Brushes.Black, typeface);
            var genericTextRunProperties = new GenericTextRunProperties(
                fontRendering,
                pixelsPerDip);
            var source = new CustomTextSource4(pixelsPerDip, fontRendering, genericTextRunProperties, pDebugFn)
            {
                EmSize      = fontSize,
                Compilation = compilation,
                Tree        = st,
                Node        = node
            };

            //source.PropertyChanged += x;
            source.Init();
            return(source);
        }