public void DoLayout()
        {
            //----------------
            //TODO: use typography text service
            //it should be faster since it has glyph-plan cache
            //----------------

            //user can use other native methods
            //to do the layout ***

            //the following code is how-to-layout with
            //our Typography lib
            //

            //then at this step
            //we calculate span size
            //resolve each font style
            _glyphLayout.EnableComposition = true;
            _glyphLayout.EnableLigature    = true;
            int lineCount = _lines.Count;


            Typeface selectedTypeface = this.DefaultTypeface;
            float    pxscale          = selectedTypeface.CalculateScaleToPixelFromPointSize(this.FontSizeInPts);

            for (int i = 0; i < lineCount; ++i)
            {
                EditableTextLine line    = _lines[i];
                List <IRun>      runList = line.UnsageGetTextRunList();
                int runCount             = runList.Count;

                for (int r = 0; r < runCount; ++r)
                {
                    TextRun tt = runList[r] as TextRun;
                    if (tt == null)
                    {
                        continue;
                    }
                    //this is text run
                    if (tt.IsMeasured)
                    {
                        continue;
                    }
                    //

                    TextRunFontStyle fontStyle = tt.FontStyle;
                    //resolve to actual font face
                    TextBuffer buffer    = tt.TextBuffer;
                    char[]     rawBuffer = buffer.UnsafeGetInternalBuffer();

                    int preCount = _outputGlyphPlan.Count;
                    _glyphLayout.Typeface = selectedTypeface;
                    _glyphLayout.Layout(rawBuffer, tt.StartAt, tt.Len);

                    //use pixel-scale-layout-engine to scale to specific font size
                    //or scale it manually

                    int postCount = _outputGlyphPlan.Count;

                    //
                    tt.SetGlyphPlanSeq(new GlyphPlanSequence(_outputGlyphPlan, preCount, postCount - preCount));
                    tt.IsMeasured = true;
                    //
                }
            }
        }