public void DoLeft()
        {
            int count = _charBuffer.Count;

            if (count == 0)
            {
                _caretCharIndex = 0;
                return;
            }
            else if (_caretCharIndex > 0)
            {
                //this is on the end
                _caretCharIndex--;

                //check if the caret can rest on this glyph?
                if (_caretCharIndex > 0)
                {
                    //find its mapping to glyph index
                    UserCodePointToGlyphIndex userCodePointToGlyphIndex = _userCodePointToGlyphIndexMap[_caretCharIndex];
                    int mapToGlyphIndex = userCodePointToGlyphIndex.glyphIndexListOffset_plus1;
                    //
                    if (mapToGlyphIndex == 0)
                    {
                        //no map
                        DoLeft();   //recursive ***
                        return;
                    }
                    //-------------------------
                    //we -1 ***
                    PxScaledGlyphPlan glyphPlan = _glyphPlans[userCodePointToGlyphIndex.glyphIndexListOffset_plus1 - 1];
                    if (!glyphPlan.AdvanceMoveForward)
                    {
                        //caret can't rest here
                        //so
                        DoLeft();   //recursive ***
                        return;
                    }
                    //---------------------
                    //
                }
            }
            else
            {
            }
        }
Beispiel #2
0
 public void Append(PxScaledGlyphPlan glyphPlan)
 {
     _glyphPlans.Add(glyphPlan);
     _accumAdvanceX += glyphPlan.AdvanceX;
 }