예제 #1
0
 public TextShapingContext(Typeface typeface, ScriptLang scLang)
 {
     _typeface        = typeface;
     _scLang          = scLang;
     _glyphPlanBuffer = new GlyphPlanBuffer(new GlyphPlanList());
     _glyphPlanSeqSet = new GlyphPlanSeqSet();
 }
예제 #2
0
        GlyphPlanSequence CreateGlyphPlanSeq(GlyphLayout glyphLayout, TextBuffer buffer, int startAt, int len)
        {
            GlyphPlanList planList  = GlyphPlanBuffer.UnsafeGetGlyphPlanList(_glyphPlanBuffer);
            int           pre_count = planList.Count;

            glyphLayout.Typeface   = _typeface;
            glyphLayout.ScriptLang = _scLang;
            glyphLayout.Layout(
                TextBuffer.UnsafeGetCharBuffer(buffer),
                startAt,
                len);


            int post_count = planList.Count;

            return(new GlyphPlanSequence(_glyphPlanBuffer, pre_count, post_count - pre_count));
        }